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, 19 Nov 2002 10:27:07 -0500
On Tue, Nov 19, 2002 at 10:08:41AM -0500, Tres Seaver wrote:
I need to use the wrappers for a Python which RPM doesn't know about (we
build a custom one in order to guarantee that it has the configuration
we need).
Okay,
I tried building the Python wrappers via distutils after commenting out
the '#include <config.h>' lines; the compile succeeds, which suggests
that the lines are not needed. Can you suggest a way to test that the
wrappers are OK? The wrapper modules import without problems.
the problem is that some of the entry points are conditionally compiled
depending whether the assocaited support was compiled within the libxml2
library. This requires the xmlversion.h file. But I don't see why
config.h is needed:
paphio:~/XML/python -> grep HAVE_ *.c
paphio:~/XML/python ->
'distutils.sysconfig' has an API, 'get_config_vars', which can tell you
where the Python configuration expects to find "system" includes:
excellent, let's reuse that !
I think that running 'xml-config' via 'os.popen' would work:
>>> foo = os.popen( 'xml-config --cflags' )
>>> bar = foo.read()
>>> print bar
-I/usr/include/gnome-xml
except you would need xml2-config that's good :-)
Could you assemble a patch for this, you're well aware of the
issues so you're in a good position to do this,
thanks
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]