[lxml-dev] install lxml 2.0.5 on Mac OS X Leopard - why is it so hard?
Kumar McMillan
kumar.mcmillan at gmail.com
Tue May 13 17:41:58 CEST 2008
On Mon, May 12, 2008 at 1:39 PM, Stefan Behnel <stefan_ml at behnel.de> wrote:
> Kumar McMillan wrote:
> > The best thing I can think of is to get --static working for libxml2.a
> > files and then I can submit to you the steps I took to build my static
> > libs from source (assuming I can get that all to work).
>
> I think a buildout will help here, as previously proposed a couple of times.
ah, yes, excellent idea. I've started fiddling with it and have
libxml2/libxslt building static libs no problem; this might just work.
It looks like zc.recipe.egg isn't going to cut it though, as I can't
find a way to pass in custom setup.py flags like --static (which I
think is still needed to find libxml2.a, etc). I found
collective.recipe.distutils which might work. I found some issues
with it already but patching as I go. More as it happens
- Kumar
>
> http://pypi.python.org/pypi/zc.buildout
> http://pypi.python.org/pypi/zc.recipe.cmmi
>
> We can configure it to build only the static versions of libxml2 and libxslt,
> and then build against those.
>
> ------------------------
> [libxml2]
> recipe = zc.recipe.cmmi
> url = http://ftp.gnome.org/pub/GNOME/sources/libxml2/2.6/libxml2-2.6.32.tar.gz
> extra_options = --without-python --enable-shared --enable-static
>
> [libxslt]
> recipe = zc.recipe.cmmi
> url = http://ftp.gnome.org/pub/GNOME/sources/libxslt/1.1/libxslt-1.1.22.tar.bz2
> extra_options = --with-libxml-prefix=${buildout:directory}/parts/libxml2/
> --without-python --disable-shared --enable-static
>
> [lxml]
> recipe = zc.recipe.egg:custom
> egg = lxml
> include-dirs = ${buildout:directory}/parts/libxml2/include/libxml2
> ${buildout:directory}/parts/libxslt/include
> library-dirs = ${buildout:directory}/parts/libxml2/lib
> ${buildout:directory}/parts/libxslt/lib
> ------------------------
>
> lxml's setup.py would then need to be changed to automatically compile
> statically on the Mac-OS platform. Although maybe we should only do that if
> buildout is running (sys.modules?).
>
> Stefan
>
More information about the lxml-dev
mailing list