Gentoo Archives: gentoo-user

From: Florian Philipp <lists@××××××××××××××××××.net>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Installing python packages for different versions
Date: Sun, 14 Jun 2009 16:04:05
Message-Id: 4A351F6E.4030807@f_philipp.fastmail.net
In Reply to: Re: [gentoo-user] Installing python packages for different versions by Khanh Nguyen
1 Khanh Nguyen schrieb:
2 > Hi Florian.
3 >
4 > ** (Sat, Jun 13, 2009 at 06:44:27PM +0200) Florian Philipp wrote:
5 >> Hi!
6 >>
7 >> This is actually a follow-up for my thread "Trouble installing Plone".
8 >>
9 >> Following scenario: I have packages which run on python-2.4 and other
10 >> packages which work with 2.5. Zope is a prominent example of the 2.4 gang.
11 >>
12 >> The problem: When I emerge a python package, for example
13 >> dev-python/imaging, it is only installed in the
14 >> /usr/lib/python-2.*/site-packages directory of the python version which
15 >> is currently enabled by eselect.
16 >>
17 >> Naturally, this is the most recent version: 2.5. However, as soon as a
18 >> python-2.4 package depends on one of these other packages, it just
19 >> doesn't work because it expects them in /usr/lib/python-2.4/site-packages.
20 >>
21 >> How am I supposed to work around this?
22 >
23 > With regards to Zope and Plone, use python2.5 but have python2.4 installed
24 > and use buildout[1] to fetch Zope/Plone.
25 >
26 > Zope needs python2.4 with PIL. A quick fix, is to either symlink or
27 > copy /usr/lib/python-2.5/site-packages/PIL* to /usr/lib/python-2.4/site-packages/
28 >
29 > You also need dev-libs/libxml2 (with python) and symlink/copy to
30 > /usr/lib/python-2.4/site-packages/{libxml2*,drv_libxml2}
31
32 Thanks for the hint! Interestingly, zope works without such a
33 symlink/copy at the moment. Maybe it isn't needed for the tasks I've
34 done so far?
35
36 >
37 > When Python dependencies are in place, you can use buildout to fetch Zope/Plone
38 > For this you need dev-python/setuptools.
39 >
40 >
41 > PS! When following the guide[1], remember to bootstrap and buildout with python2.4.
42 > eg: python2.4 bootstrap.py && python2.4 ./bin/buildout
43 >
44 > PSS! If you use sudo and have a restrictive umask for your user, you need to lower
45 > it to eg 022 before creating the buildout enviroment.
46 >
47
48 Thanks for your answer but I have to say, this looks like a really
49 cumbersome workaround. Wouldn't it be better to make portage and
50 python-updater aware of this problem?
51
52 The update from python-2.4 to 2.5 was a minor one with only a few
53 incompatible packages. What shall happen when we stabilize 3.0? We'll
54 run into orders of magnitude more problems than we did till now if we
55 keep it as it is!
56
57 Do you think I should open a bug for this?

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies

Subject Author
Re: [gentoo-user] Installing python packages for different versions Mike Kazantsev <mk.fraggod@×××××.com>