Re: [xml] Building Python wrappers for libxml2 and libxslt under Python 2.2
- From: Daniel Veillard <veillard redhat com>
- To: Tres Seaver <tseaver zope com>
- Cc: xml gnome org
- Subject: Re: [xml] Building Python wrappers for libxml2 and libxslt under Python 2.2
- Date: Tue, 10 Sep 2002 17:21:26 -0400
On Tue, Sep 10, 2002 at 12:24:12PM -0400, Tres Seaver wrote:
On a box where libxml2 and libxslt are installed via RPM, I need to
build the Python wrappers for a Python which is *not* the system
Python. Under Python 2.1.3, this recipe works:
$ cd opt/libxml2-python-2.4.24
$ ../../bin/python setup.py build install
Under Python 2.2.1, the same compile fails, because each C module tries
to include the header file, "config.h". My guess is that the 2.1.3
builds are working (or at least appearing to) because Python's own
include directory contains a config.h; for Python >= 2.2, that file was
renamed pyconfig.h. In either case, the Python.h includes the
appropriate file, and so including it directly has no effect.
Hum, right ... BTW my RPM spec file (and Red Hat ones since they are
the same :-) build libxml2-python and libxslt-python with modules
for all the python installations found at RPM generation time. And
this does not use the setup.py stuff (make rpm in the directory does it).
Is this header file supposed to be one generated by the libxml2/libxslt
configure process, rather than the Python one? If so, how will this
configuration be available in an environment where the base packages
were compiled via RPM? config.h is not installed into
/usr/include/libxml2, for instance.
Possibly including <libxml/xmlversion.h> should do it.
BTW I was unable to find how to lookup/associate Include directories
from the setup.py scripts. If libxml2 is installed in /usr it's easy
to spot but otherwise one would have to run xml-config, extract the
parameter and use them from the script. And for Windows I have really
no idea how to do this.
Daniel
--
Daniel Veillard | Red Hat Network https://rhn.redhat.com/
veillard redhat com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]