You are not logged in.

#1 2007-01-30 04:53:13

bangkok_manouel
Member
From: indicates a starting point
Registered: 2005-02-07
Posts: 1,556

Python 2.5 and rebuilding packages

Hi Archers,

Pure newbie question will follow...

I upgraded python to version 2.5. Therefore, many packages are broken what actually is not really a surprise. Until now, in that sort of case, I've just been waiting for the packages to be rebuild. However, today, I would like to rebuild some packages by myself to learn a little bit more about linux and Arch.

So, I've spotted a prey of choice : exaile.

Now the point is that I don't know exactly what should be modified in the source archive to build it against Python 2.5.

If someone could kindly help me to decrease my newbiness level.

Thanks in advance.

Offline

#2 2007-01-30 08:42:22

brain0
Developer
From: Aachen - Germany
Registered: 2005-01-03
Posts: 1,382

Re: Python 2.5 and rebuilding packages

In most cases, nothing needs to be modified. You simply re-run the same PKGBUILD that was used for python 2.4. If you are lucky, it will work without modifications.

Offline

#3 2007-01-30 11:11:50

bangkok_manouel
Member
From: indicates a starting point
Registered: 2005-02-07
Posts: 1,556

Re: Python 2.5 and rebuilding packages

Thanks a lot for your reply.

So I've definitely been unlucky as exaile wouldn't work being "just recompiled".

I'll try again as soon as I get home and try to post relevant informations to continue my quest of the successful build against 2.5 python.

Cheers.

Offline

#4 2007-01-30 13:32:08

IceRAM
Member
From: Bucharest, Romania
Registered: 2004-03-04
Posts: 772
Website

Re: Python 2.5 and rebuilding packages

bangkok_manouel wrote:

Pure newbie question will follow...

I upgraded python to version 2.5.

Just to be sure.

You do know that Python 2.5 is in testing and, while being there, all packages depending on it will be rebuilt and put in the same place (testing).

Once over, they will all move to current/extra.

Offline

#5 2007-01-30 13:49:52

bangkok_manouel
Member
From: indicates a starting point
Registered: 2005-02-07
Posts: 1,556

Re: Python 2.5 and rebuilding packages

I knew that indeed. Thanks for your reply and information anyway. However, exaile is my preferred audio application and it's broken now... It's from [community] so I don't know if those packages also go thru to the testing area... I just thought it was the right time to try to fix it and to learn something at the same time.

Offline

#6 2007-01-30 14:45:52

bangkok_manouel
Member
From: indicates a starting point
Registered: 2005-02-07
Posts: 1,556

Re: Python 2.5 and rebuilding packages

ok, so let's start with :

[eb@blackout exaile]$ sudo pacman -Qi python
Name           : python
Version        : 2.5-1
Groups         : None
Packager       : Jason Chu <jason@archlinux.org>
URL            : http://www.python.org
License        : None
Architecture   : i686
Size           : 40731964
Build Date     : Fri Jan 19 01:10:23 2007 UTC
Install Date   : Thu Jan 25 05:29:31 2007 UTC
Install Script : No
Reason:        : explicitly installed
Provides       : None
Depends On     : bzip2 db gdbm openssl zlib 
Required By    : aurbuild dbus-python foff gnome-doc-utils gnome-python menumaker mutagen pycairo pygobject 
                 pymad pyogg pyorbit pypanel pyrex python-elementtree python-eyed3 python-feedparser 
                 python-numeric python-pysqlite python-xlib pyvorbis pyxdg quodlibet wifi-radar 
Conflicts With : None
Description    : A high-level scripting language

so that's the right snake...

then, as it may provide useful informations...

# Maintainer: Roman Kyrylych <Roman.Kyrylych@gmail.com>
# Contributor: Benjamin Wild <benwild@gmx.de>

pkgname=exaile
pkgver=0.2.8
pkgrel=1
pkgdesc="Exaile is a media player aiming to be similar to KDE's AmaroK, but for GTK+"
arch=(i686 x86_64)
url="http://www.exaile.org"
license="GPL"
depends=('pygtk' 'pyvorbis' 'gstreamer0.10-good' 'gstreamer0.10-python'\
         'python-pysqlite' 'gstreamer0.10-gnomevfs' 'gstreamer0.10-gconf'\
         'dbus-python' 'python-elementtree' 'mutagen')
makedepends=('pkgconfig' 'python')
install=('exaile.install')
source=(http://www.exaile.org/files/$pkgname\_$pkgver.tar.gz)
md5sums=('a07d5acdebbc42a72e297963f5aec249')

build() {
  cd $startdir/src/$pkgname\_$pkgver
  make || return 1
  make DESTDIR=$startdir/pkg install

finally,

[eb@blackout exaile]$ sudo makepkg -c
==> Making package: exaile 0.2.8-1 (Wed Jan 31 04:36:26 ICT 2007)
==> Checking Runtime Dependencies...
==> Checking Buildtime Dependencies...
==> Retrieving Sources...
==>     Using local copy of exaile_0.2.8.tar.gz
==> Validating source files with MD5sums
    exaile_0.2.8.tar.gz ... Passed
==> Extracting Sources...
==>     tar --use-compress-program=gzip -xf exaile_0.2.8.tar.gz
==> Starting build()...
cd mmkeys && make mmkeys.so && cd ..
make[1]: Entering directory `/var/abs/local/exaile/src/exaile_0.2.8/mmkeys'
make[1]: warning: jobserver unavailable: using -j1.  Add `+' to parent make rule.
pygtk-codegen-2.0 --prefix mmkeys \
        --register `pkg-config --variable=defsdir pygtk-2.0`/gdk-types.defs \
        --register `pkg-config --variable=defsdir pygtk-2.0`/gtk-types.defs \
        --override mmkeys.override \
        mmkeys.defs > gen-tmp
***INFO*** There are no declared global functions.
***INFO*** There are no declared methods.
***INFO*** There are no declared virtual proxies.
***INFO*** There are no declared virtual accessors.
***INFO*** There are no declared interface proxies.
mv gen-tmp mmkeyspy.c
cc -march=prescott -O2 -pipe -fomit-frame-pointer -fPIC -O2 `pkg-config --cflags gtk+-2.0 pygtk-2.0` -I/usr/include/python2.4   -c -o mmkeyspy.o mmkeyspy.c
mmkeyspy.c:3:20: error: Python.h: No such file or directory
In file included from mmkeys.override:6:
/usr/include/pygtk-2.0/pygobject.h:20: error: expected specifier-qualifier-list before 'PyObject'
/usr/include/pygtk-2.0/pygobject.h:27: error: expected specifier-qualifier-list before 'PyObject_HEAD'
/usr/include/pygtk-2.0/pygobject.h:38: error: expected specifier-qualifier-list before 'PyObject_HEAD'
/usr/include/pygtk-2.0/pygobject.h:48: error: expected specifier-qualifier-list before 'PyObject_HEAD'
/usr/include/pygtk-2.0/pygobject.h:60: error: expected specifier-qualifier-list before 'PyObject_HEAD'
/usr/include/pygtk-2.0/pygobject.h:67: error: expected declaration specifiers or '...' before 'PyTypeObject'
/usr/include/pygtk-2.0/pygobject.h:68: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
/usr/include/pygtk-2.0/pygobject.h:76: error: expected ')' before '*' token
/usr/include/pygtk-2.0/pygobject.h:78: error: expected ';' before 'void'
mmkeys.c:16: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
mmkeys.c:21: warning: data definition has no type or storage class
mmkeys.c:21: error: expected ',' or ';' before 'PyMmKeys_Type'
mmkeys.c:30: error: expected declaration specifiers or '...' before 'PyObject'
mmkeys.c:30: error: expected declaration specifiers or '...' before 'PyObject'
mmkeys.c: In function '_wrap_mmkeys_new':
mmkeys.c:34: error: 'args' undeclared (first use in this function)
mmkeys.c:34: error: (Each undeclared identifier is reported only once
mmkeys.c:34: error: for each function it appears in.)
mmkeys.c:34: error: 'kwargs' undeclared (first use in this function)
mmkeys.c:39: error: 'struct _PyGObject_Functions' has no member named 'pygobject_constructv'
mmkeys.c:40: error: 'PyGObject' has no member named 'obj'
mmkeys.c:42: error: 'PyExc_RuntimeError' undeclared (first use in this function)
mmkeys.c: At top level:
mmkeys.c:49: warning: data definition has no type or storage class
mmkeys.c:49: error: expected ',' or ';' before 'PyMmKeys_Type'
mmkeys.c:98: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'mmkeys_functions'
mmkeys.c:104: error: expected ')' before '*' token
make[1]: *** [mmkeyspy.o] Error 1
make[1]: Leaving directory `/var/abs/local/exaile/src/exaile_0.2.8/mmkeys'
make: *** [mmkeys.so] Error 2
==> ERROR: Build Failed.  Aborting...

Thank you very much in avance for any advice.


EDIT (as it may be interesting too)
----------------------------------------
if I run the currently installed exaile, i get :

[eb@blackout ~]$ exaile
Traceback (most recent call last):
  File "/usr/bin/exaile", line 26, in <module>
    import xl.dbusinterface
  File "/usr/share/exaile/xl/dbusinterface.py", line 18, in <module>
    import dbus
  File "/usr/lib/python2.5/site-packages/dbus/__init__.py", line 1, in <module>
    from _dbus import *
  File "/usr/lib/python2.5/site-packages/dbus/_dbus.py", line 48, in <module>
    from proxies import *
  File "/usr/lib/python2.5/site-packages/dbus/proxies.py", line 2, in <module>
    import introspect_parser
  File "/usr/lib/python2.5/site-packages/dbus/introspect_parser.py", line 1, in <module>
    import libxml2
ImportError: Bad magic number in /usr/lib/python2.4/site-packages/libxml2.pyc

Last edited by bangkok_manouel (2007-01-30 14:51:55)

Offline

#7 2007-01-30 21:52:23

iphitus
Forum Fellow
From: Melbourne, Australia
Registered: 2004-10-09
Posts: 4,927

Re: Python 2.5 and rebuilding packages

exaile should be built against [current], and you would be better off using python 2.4

file a bug

Offline

#8 2007-01-30 23:50:35

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: Python 2.5 and rebuilding packages

iphitus is right, of course, but as you said you wanted to learn, here's the cause of the error.

In your build output, there are the following lines:

cc -march=prescott -O2 -pipe -fomit-frame-pointer -fPIC -O2 `pkg-config --cflags gtk+-2.0 pygtk-2.0` -I/usr/include/python2.4   -c -o mmkeyspy.o mmkeyspy.c
mmkeyspy.c:3:20: error: Python.h: No such file or directory

The first line uses the old 2.4 python path, which no longer exists on your system, to locate the headers. The second line is the resulting error message, as the Python.h header file is not in that location.

If you're feeling adventurous and want to learn more, you could have a look for the Makefile in the source directory, and if you can identify where the 2.4 path is specified, change it to 2.5 with sed. Either way, file a bug with the Exaile folks.

Offline

#9 2007-01-31 01:56:17

bangkok_manouel
Member
From: indicates a starting point
Registered: 2005-02-07
Posts: 1,556

Re: Python 2.5 and rebuilding packages

Thanks for the replies.

So I went one step further. I've changed the path to Python 2.5 and building went just fine big_smile
However, when I try to run exaile, I still get :

[eb@blackout ~]$ exaile
Traceback (most recent call last):
  File "/usr/bin/exaile", line 26, in <module>
    import xl.dbusinterface
  File "/usr/share/exaile/xl/dbusinterface.py", line 18, in <module>
    import dbus
  File "/usr/lib/python2.5/site-packages/dbus/__init__.py", line 1, in <module>
    from _dbus import *
  File "/usr/lib/python2.5/site-packages/dbus/_dbus.py", line 48, in <module>
    from proxies import *
  File "/usr/lib/python2.5/site-packages/dbus/proxies.py", line 2, in <module>
    import introspect_parser
  File "/usr/lib/python2.5/site-packages/dbus/introspect_parser.py", line 1, in <module>
    import libxml2
ImportError: Bad magic number in /usr/lib/python2.4/site-packages/libxml2.pyc

For the newbie's eyes, this seems related to libxml2, which is in testing too ATM.
/usr/lib/python2.4/site-packages/libxml2.pyc does not exist on my system nor in /usr/lib/python2.5/site-packages/

So before I file a bug or email the exaile guys, could you please tell me what you think :
- could this problem be the result of another package's problem/bug ?
- giving the fact that building exaile went fine, does it mean that I don't have to check again the source files to see if I missed something.
- should I buy a 6-pack and wait for the update ?

Thanks

Offline

#10 2007-01-31 11:12:07

noriko
Member
From: In My Mind
Registered: 2006-06-09
Posts: 535
Website

Re: Python 2.5 and rebuilding packages

i personally symlinked
/usr/lib/python2.4 > /usr/lib/python2.5

and forced reinstalled everything that needed python.
everything works without a problem for me so far.


The.Revolution.Is.Coming - - To fight, To hunger, To Resist!

Offline

#11 2007-01-31 12:48:57

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: Python 2.5 and rebuilding packages

Symlinks like that are a dirty hack - if they work, fine, but they don't always. Better to do as the OP is doing i.e. actually fixing things.

bangkok_manuel - are you running the testing repo, or have you installed 2.5 on its own?

Offline

#12 2007-01-31 13:22:10

bangkok_manouel
Member
From: indicates a starting point
Registered: 2005-02-07
Posts: 1,556

Re: Python 2.5 and rebuilding packages

noriko : thanks for the suggestion

tomk : I'm running testing

cheers

Offline

#13 2007-04-08 00:00:24

billy
Member
From: Slovenia
Registered: 2006-09-13
Posts: 164

Re: Python 2.5 and rebuilding packages

i wanted to try exaile and i run into similar problem as bangkok_manouel did. there was an ImportError from pygst.pyc file. so exaile just wouldnt start because there were some files in /usr/lib/python2.4/ folder that exaile was using them. i was wondering what are those files doing there if arch moved to python 2.5. i tried 'pacman -Qo' on all of the files in 2.4 folder and they werren't owned by any package. i didn't put them there unless some scripts/binaries from libxml2, gstreamer0.10-python, alunn and qpkg packages created them (yes libxml2.pyc and some other files were also there).
all of this files had "*.pyc" or/and "*.pyo" endings. i don't know almost nothing about python, but as google told me these files are byte-compiled to speed-up the start-up process of same named "*.py" programs. so were these files created while running these programs or were they compiled before and therefore owned by a package. because if they were owned by a package then they didn't get removed at upgrade/remove process. and if they were created at run time, i think that .install script in a package should remove these files when an upgrade occurs or the package is removed.

Offline

#14 2007-04-08 09:26:47

emphire
Member
From: Canada
Registered: 2007-03-21
Posts: 203

Re: Python 2.5 and rebuilding packages

Here's my exaile PKGBUILD.  Works for me on arch64.  The main difference is the PYTHON_DIR=/usr/include/python2.5 line.

# Contributor: Jonathan Wiersma

pkgname=exaile
pkgver=0.2.9
pkgrel=1
pkgdesc="GTK+ media player modelled on amaroK"
depends=('gstreamer0.10-python' 'python-pysqlite' 'dbus-python' 'pyvorbis' 'pyma
d' 'pyxml' 'pil' 'gstreamer0.10-esd' 'gnome-python-extras' 'mutagen' 'python')
makedepends=()
source=(http://www.exaile.org/files/$pkgname\_$pkgver.tar.gz)
md5sums=('d52241d30a66286d9483e30e1259d8d4')
url="http://www.exaile.org"
license="GPL"
arch=('x86_64')
#install=${pkgname}.install

build() {
  cd $startdir/src/${pkgname}_${pkgver}
  make PYTHON_DIR=/usr/include/python2.5 || return 1
  make DESTDIR=$startdir/pkg install
}

Offline

#15 2007-04-08 09:41:51

billy
Member
From: Slovenia
Registered: 2006-09-13
Posts: 164

Re: Python 2.5 and rebuilding packages

exaile works for me just fine without rebuilding it. i just needed to remove some files in /usr/lib/python-2.4 that exaile depends on. i am just asking: why these files haven't got removed after a package upgrade/remove? hmm

Last edited by billy (2007-04-08 09:47:01)

Offline

Board footer

Powered by FluxBB