[Top][All Lists]

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

Re: libxml2-python

From: Cyril Roelandt
Subject: Re: libxml2-python
Date: Sun, 10 Mar 2013 17:10:06 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.12) Gecko/20130116 Icedove/10.0.12

On 03/07/2013 11:38 PM, Andreas Enge wrote:
Am Donnerstag, 7. März 2013 schrieb Cyril Roelandt:
   From setup.py:
# those are examined to find
# - libxml2/libxml/tree.h
# - iconv.h
# - libxslt/xsltconfig.h
includes_dir = [

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.

Thanks for your help! Indeed, when running "setup.py install" from the guix
builder, libxml2 is found after installing it, so the "--prefix" is
honoured. However, then iconv.h is searched for in the given list of paths,
which does not include /nix/store/...glibc.../include, and the CPATH is not
taken into account, so iconv.h is not found.

I tried adding glibc as an explicit input and to overwrite the path in
setup.py. However, that does not use the glibc of the CPATH, but builds
another one on top of it. Do I understand it correctly that I need to use
glibc-final instead?

$ python setup.py install --prefix=/path/to/foo/bar
You may have to adjust $PYTHONPATH to something like:
for this to work.

Specifying no --prefix, it now tries to install a file as
which fails since this is another package, not libxml2.
Giving as --prefix the output path, files are instead installed into
which looks reasonable.

I am attaching the resulting patch. Is it reasonable to apply it to the
libxml2 package, or would it be preferable to create a separate libxml2-
python package?

I'm not sure it is a good idea to automatically install bindings along with the library, so I'd rather have a package per binding.

On an unrelated note, the PYTHONPATH envrionment variable must be adjusted in order to use the library, since it is not installed in a "standard" location, but I guess there is not much we can do about it.


reply via email to

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