[lxml-dev] setupinfo.py that downloads/builds libxml2/libxslt

Stefan Behnel stefan_ml at behnel.de
Thu Nov 6 22:32:11 CET 2008


Hi,

Stefan Behnel wrote:
> Ian Bicking wrote:
>> I've attached a version of setupinfo.py that will download and build
>> libxml2 and libxslt.  There are some problems with the script, but
>> hopefully this is a start.
> 
> thanks a lot for doing this. It does not yet build a static lxml for me (the
> static stuff was meant for Windows and it doesn't really work on other
> systems), but I'm fixing it up to do that.

Ok, I reworked your (pretty complete and well done) implementation and renamed
the option to "--static-deps" to make it clear that it triggers a static build
(the name is still open to improvement). It's on the trunk now. Everyone who
can give it a try: please install a recent Cython and do so! Fixes and bug
reports are very welcome.

Since the main incentive for this change was to make it work under MacOS-X,
here's a big plea for Mac users to test this and suggest fixes!

I enabled the static build for other platforms than Windows, so I hope that it
still works under Windows. Another thing to test.


>> do I have to run "make; make install" for those libraries if it is
>> a static build, or would ./configure be sufficient?)
> 
> "make" is sufficient, no installation required. libxslt even takes a
> "--with-libxml-src=DIR" option to build against an uninstalled libxml2.

I still left the "make install" in, as it makes the integration with the rest
of the build process easier, which requires a working "xslt-config". That
could potentially be stripped out.


>> Maybe there can also be a fallback to archives distributed directly with lxml?
> 
> Yes, that would be great. If they are there, use them, otherwise, do a normal
> build.

I changed the download directory to "libs" instead of "build/tmp" to allow
users to put their libraries there. However, this does not currently trigger a
static build without the "--static-deps" option. I'd like to see how people
use this first before enabling even more smartness.

Stefan



More information about the lxml-dev mailing list