Skip to main content

A recipe to build lxml

Project description

This recipe automates the installation of the lxml python package and, additionally, builds it statically against dependent libraries like libxml2, libxlst.

Detailed Documentation

Supported options

The recipe supports the following options:


Set to the desired lxml egg, e.g. lxml or lxml==2.1.2

libxslt-url, libxml2-url

The URL to download the source tarball of these libraries from. Currently defaults to:
build-libxslt, build-libxml2

Set to true if these should be build. Needed for a static build.


true``or ``false


Needed if libxml2 is not built.


Needed if libxml2 is not built.


Path to the xslt-config binary. Not needed if build-libxslt is set to true.


Path to the xml2-config binary. Not needed if build-libxml2 is set to true.


Set to true to force rebuilding libraries every time.

Example usage

We’ll start by creating a buildout that uses the recipe:

>>> xsltconfig = "foo"
>>> xml2config = "bar"
>>> write('buildout.cfg',
... """
... [buildout]
... parts = test1
... log-level = INFO
... index =
... [test1]
... recipe = z3c.recipe.staticlxml
... xslt-config = %(xsltconfig)s
... xml2-config = %(xml2config)s
... """ % locals())

Running the buildout gives us:

>>> system(buildout)
Installing test1.
xslt-config: foo
xml2-config: bar


Stefan Eletzhofer, Author

Change history


  • no changes yet

0.1 (2008-11-27)

  • Added iconv library, which enables fully static builds. This is actually a bug in lxml’s setup. [seletz]

  • Updated docs, removed junk code [seletz]

  • Added tweaks needed for Mac OS X [seletz]

  • Added basic build steps for liblxml2, libxslt and lxml. [seletz]

  • Created recipe with ZopeSkel [seletz].


Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

z3c.recipe.staticlxml-0.1dev-r93403.tar.gz (7.8 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page