unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Cyril Roelandt <tipecaml@gmail.com>
To: Andreas Enge <andreas@enge.fr>
Cc: bug-guix@gnu.org
Subject: Re: libxml2-python
Date: Sun, 10 Mar 2013 17:10:06 +0100	[thread overview]
Message-ID: <513CB05E.80609@gmail.com> (raw)
In-Reply-To: <201303072338.13585.andreas@enge.fr>

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 = [
>> "/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.
>
> 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?
>
>> 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.
>
> Specifying no --prefix, it now tries to install a file as
>     /nix/store/j8f28wavspyic8g9didl1ninaz48vdq0-
> python-2.7.3/lib/python2.7/site-packages/libxml2mod.so
> which fails since this is another package, not libxml2.
> Giving as --prefix the output path, files are instead installed into
>     /nix/store/svnw8fq87qrfrpcs7grx5nram558ahkp-
> libxml2-2.9.0/lib/python2.7/site-packages/
> 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.

Cyril.

  parent reply	other threads:[~2013-03-10 16:22 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-06 22:43 libxml2-python Andreas Enge
2013-03-07  0:47 ` libxml2-python Cyril Roelandt
2013-03-07 22:38   ` libxml2-python Andreas Enge
2013-03-07 23:25     ` libxml2-python Ludovic Courtès
2013-03-08 12:13       ` libxml2-python Andreas Enge
2013-03-14 13:25         ` libxml2-python Ludovic Courtès
2013-03-14 14:17           ` libxml2-python Andreas Enge
2013-03-10 16:10     ` Cyril Roelandt [this message]
2013-03-12 20:26       ` libxml2-python Andreas Enge
2013-03-14 17:34         ` libxml2-python Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=513CB05E.80609@gmail.com \
    --to=tipecaml@gmail.com \
    --cc=andreas@enge.fr \
    --cc=bug-guix@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).