[Zope-dev] lxml is hard to install (was Re: How to test changes to ZTK packages?)

Jim Fulton jim at zope.com
Tue Jun 30 17:49:17 EDT 2009


On Jun 30, 2009, at 4:51 PM, Tres Seaver wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Jim Fulton wrote:
>
>> I'm not familiar with the static-deps option. To what? Its setup.py?
>
> $ wget http://pypi.python.org/packages/source/l/lxml/lxml-2.2.2.tar.gz
> ...
> $ tar xzf lxml-2.2.2.tar.gz
> $ cd lxml-2.2.2
> $ /path/to/python setup.py bdist_egg --static-deps
>
>> It didn't install cleanly for me on Centos 4.  (I've generally had
>> difficulty with libxml2 and libxslt on Red Hat based systems,) I'm
>> sure if I screwed around with it, I could get it to work.  I don't
>> want to screw around with it just to work on ZTK libraries, which
>> don't actually depend on it.  I will if I have to.  I ended up using
>> an Ubuntu VM to work on it.  I'd prefer not to have to.
>>
>> I'm sad to say this.  I think lxml is a worthy project.  It's a shame
>> that the system installs of libxml2 and libxslt are such a PITA.  I
>> wonder if it would be better for lxml to include it's own copies of
>> these libraries that it built and linked against statically.
>
> That is what --static-deps' does:  it downloads and builds libxml2 /
> libxslt from source, and links them statically into the .so / .dll /
> .pyd file for lxml.

Ah cool.  I could then stuff that in my egg cache.

This seems to work for me on Mac OS X.  I'm not sure how to run the  
tests. Unfortunately, the tests aren't included in the egg.  Running  
tests.py in the distro root doesn't work either.

>> Will lxml look somewhere in /usr/local? I wonder if hand-built  
>> libxml2
>> and libxslt libraries in /usr/local would make lxml easier to deal  
>> with.
>
> I would just use --static-deps (works well for me on CentOS4, for  
> instance).


This is a good work around. Thanks!

It would be nice to automate this a bit more.

Jim

--
Jim Fulton
Zope Corporation




More information about the Zope-Dev mailing list