Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 17834 - zope and libxml2
Summary: zope and libxml2
Status: RESOLVED LATER
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: All Linux
: High major (vote)
Assignee: net-zope (OBSOLETE)
URL:
Whiteboard:
Keywords:
: 17835 17836 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-03-19 13:34 UTC by Axxackall
Modified: 2004-01-19 06:46 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
dev-libs/libxml2-py21/libxml2-py21-2.5.6.ebuild (libxml2-py21-2.5.6.ebuild,500 bytes, text/plain)
2003-04-17 18:13 UTC, Jason Shoemaker (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Axxackall 2003-03-19 13:34:48 UTC
The package dev-libs/libxml2 installs python bindings for python-2.2. Zope
doesn't use that python version, instead it uses the old one, python-2.1, which
doesn't have libxml2 python bindings in its site-packaes.

Some zope products (like CMFOODocument) require to import libxml2 and thus
cannot work. 

Binary bindings do not work (besides, what binaries? it's Gentoo!). The tarball
from xmlsoft doesn't compile.

How to install libxml2 (and libxslt) python bindings from the source code into
site-packages of python2.1?

Reproducible: Always
Steps to Reproduce:



Expected Results:  
"import libxml2" and "import libxslt" must work in Zope.
Comment 1 Martin Holzer (RETIRED) gentoo-dev 2003-03-19 13:43:01 UTC
*** Bug 17835 has been marked as a duplicate of this bug. ***
Comment 2 Martin Holzer (RETIRED) gentoo-dev 2003-03-19 13:45:44 UTC
*** Bug 17836 has been marked as a duplicate of this bug. ***
Comment 3 Daniel Robbins (RETIRED) gentoo-dev 2003-03-25 20:33:58 UTC
Can you make /usr/lib/python2.1/site-packages a symlink to /usr/lib/python2.2/site-packages? Does that allow Zope to begin working?
Comment 4 Axxackall 2003-03-26 08:32:49 UTC
Nope, symlinks (as well as copiing) doesn't work - module libraries are linked with librarties and thus must work with the proper one. I've tried and got "reference" errors.
Comment 5 Axxackall 2003-03-27 08:06:12 UTC
B/c Python is SLOTted in Gentoo, I am proposing to make some sort of "python-lib-install" procedure, which will take a list of *ALL* installed pythons, and then install the lib with *EACH* of them. 

In a similar way "python-lib-uninstall" must exist.
Comment 6 Axxackall 2003-03-27 08:12:56 UTC
By the way, despite the fact that today this bug is bothering mostly b/c of the fact that Zope is using non-default slotted version of python, the bug itself is more general than just Zope related. 

Any Python based application, if it is requires explicit version of python (not the latest one, but something like python-2.1.*) *AND* that application requires some python libraries to be installed, is under risk to be broken, b/c those python libraries will be installed on the (default) python slot which is not the slot that is used by that application.

Please, try to avoid hacking, as later it will hit back when that library has to be upgraded.
Comment 7 Jason Shoemaker (RETIRED) gentoo-dev 2003-04-17 18:13:36 UTC
Created attachment 10803 [details]
dev-libs/libxml2-py21/libxml2-py21-2.5.6.ebuild

Does this work? 

--kutsuya
Comment 8 Axxackall 2003-10-26 05:18:34 UTC
For the given project I need both xml2 and xslt and your attachment doesn't
solve xslt for me. So, I cannot say if your ebuild can solve xml2 separately.
Comment 9 Axxackall 2003-10-26 05:30:20 UTC
When I need xml2 and xslt ONLY for python-2.1 then I do these steps:

[code]
emerge dev-lang/python/python-2.1.3-r1.ebuild
emerge dev-libs/libxml2
emerge dev-libs/libxslt
emerge python
[/code]

However if you upgrade (or just re-emerge) xml2 or xslt now then it will
uninstall xml2 and xslt files from /usr/lib/python2.1/site-packages
That's why when I need xml2 and xslt on both pythons then I do this:

[code]
emerge dev-lang/python/python-2.1.3-r1.ebuild
emerge dev-libs/libxml2
emerge dev-libs/libxslt
mkdir /tmp/xp21
cp /usr/lib/python2.1/site-packages/*xml2* /tmp/xp21
cp /usr/lib/python2.1/site-packages/*xslt* /tmp/xp21
emerge python
emerge dev-libs/libxml2
emerge dev-libs/libxslt
mv /tmp/xp21/* /usr/lib/python2.1/site-packages
[/code]

I's a dirty trick but it works until someone from python/gentoo developers
will fix it finally.
Comment 10 Heinrich Wendel (RETIRED) gentoo-dev 2004-01-19 06:46:34 UTC
with zope 2.7 this won't be a problem anylonger since it will require python 2.3.3, and i don't think we'll come up with a solution until then