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: Thu, 07 Mar 2013 01:47:46 +0100	[thread overview]
Message-ID: <5137E3B2.4090801@gmail.com> (raw)
In-Reply-To: <201303062343.03155.andreas@enge.fr>

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	other threads:[~2013-03-07  0:59 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 ` Cyril Roelandt [this message]
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     ` libxml2-python Cyril Roelandt
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=5137E3B2.4090801@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).