bug-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: libxml2-python


From: Cyril Roelandt
Subject: Re: libxml2-python
Date: Thu, 07 Mar 2013 01:47:46 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.12) Gecko/20130116 Icedove/10.0.12

On 03/06/2013 11:43 PM, Andreas Enge wrote:
xorg-server requires mesa, and mesa requires python and libxml2, more
exactly libxml2-python.

This is supposed to be set up the python way using
    python setup.py build install
which already does not work manually:
    failed to find headers for libxml2: update includes_dir
Supposedly, one needs to specify the path to libxml2.


From setup.py:

# those are examined to find
# - libxml2/libxml/tree.h
# - iconv.h
# - libxslt/xsltconfig.h
includes_dir = [
"/usr/include",
"/usr/local/include",
"/opt/include",
os.path.join(ROOT,'include'),
HOME
];

You could patch setup.py to add the right path. Or you could run "configure" in libxml2 with "--prefix=<yourprefix>", then cd into the "python" directory, and ROOT will be set to <youprefix> in setup.py.

Alternatively, one can run setup.py during the compilation of libxml2.
Trying this by hand results in
    copying build/lib.linux-x86_64-2.7/libxml2mod.so ->
/usr/local/lib/python2.7/dist-packages
    error: /usr/local/lib/python2.7/dist-packages/libxml2mod.so: Permission
denied
Clearly, we do not want python modules to end up in /usr/local.


Try:

$ python setup.py install --prefix=/path/to/foo/bar

You may have to adjust $PYTHONPATH to something like:

/path/to/foo/bar:$PYTHONPATH

for this to work.


Cyril.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]