[lxml-dev] specifying lxml as a dependency?

Tres Seaver tseaver at palladion.com
Mon Nov 10 17:13:59 CET 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Stefan Behnel wrote:
> Chris Withers wrote:
>> Ian Bicking wrote:
>>> Chris Withers wrote:
>>>> I'm just about to start moving Twiddler from ElementTree to lxml and
>>>> I'm wondering how to specify lxml as a requirement in Twiddler's
>>>> setup.py?
>>>>
>>>> Do I just do the normal setuptools dance or is there more to it than
>>>> that?
>>>>
>>>> If I specify lxml as a requirement, how do lxml's requirements for
>>>> libxml2 and libxlst get satisfied?
>>> Just as 'lxml'.  On Windows it'll pull the binary egg.
>> ...and that binary egg includes libxml2 and libxlst?
> 
> As it says on PyPI and our web site, yes.
> 
> https://codespeak.net/lxml/installation.html#ms-windows
> 
> 
>>> Linux binary eggs are too problematic to be worth
>>> trying.  The system will have to have libxml2/libxslt and the -dev
>>> packages (on Linux),
>> Okay, so the user will have to get libxml2 and libxslt on the system
>> "somehow" (ie: os package manager, source install, etc) *before*
>> easy_install'ing lxml?
> 
> I wouldn't know any distribution that doesn't install libxml2/libxslt by
> default, and for most Linux users, installing the -dev packages for a
> library is not much harder than eating a warm pie (assuming you like the
> taste).
> 
> https://codespeak.net/lxml/installation.html#installation
> 
> (I just clarified to bit on MS Windows here, haven't uploaded it yet.)
> 
> 
>> What happens if they forget and easy_install lxml without libxml2 or
>> libxslt?
> 
> You will get an error. AFAIR, it's even pretty specific about what's missing.
> 
> 
>>> and they could do "STATIC_DEPS=true easy_install
>>> Twiddler" to build a static lxml on Macs
>> Where would "STATIC_DEPS=true easy_install Twiddler" go?
> 
> That's the command that will install Twiddler on a Mac once Twiddler has a
> dependency on lxml and is uploaded to PyPI.
> 
> 
>>> (with the trunk, which itself
>>> is a little harder to build, but hopefully there will be an easier
>>> release before too long).
>> Not sure what this means. What's the difference between the trunk and
>> the last release on PyPI?
> 
> Well, development continues, so there are quite some internal differences.
> What's relevant here is that the setup.py in the current trunk knows how
> to download and build libxml2 and libxslt, and how to build lxml
> statically using the result. That's specifically made (but not only meant)
> for Mac users that run into crashes due to conflicting library versions.

It should also help users running on older Linux distrox (e.g., Centos4)
whose system-installed libxml2 / libxslt is too old for installing a
current lxml.


Tres.
- --
===================================================================
Tres Seaver          +1 540-429-0999          tseaver at palladion.com
Palladion Software   "Excellence by Design"    http://palladion.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFJGF3H+gerLs4ltQ4RArvnAKC5JU3joSrub0OQBKlxM+mZ6zPxiACgp/Su
pjSh//ryuiqx6evoCr00hOg=
=brxa
-----END PGP SIGNATURE-----



More information about the lxml-dev mailing list