Notes on Pyrex
==============

The lxml wrapper around libxml2 and libxslt is written in Pyrex_.  However,
there are known issues with the current version of Pyrex (0.9.3.1) and version
4.x of gcc.  Most Linux distributions have the necessary patches applied, but
there is still a certain chance yours hasn't.  Also, MacOS-X is known to ship
with GCC 4, so users may run into problems when compiling Pyrex generated code
on this system.  If the C compiler fails to compile the file src/lxml/etree.c,
you likely have used an unpatched version of Pyrex to build it.

There are two ways to get around this problem.  First of all, if you are using
a release version of lxml, it should come with the generated C file in the
source distribution.  There is no need to regenerate it using Pyrex.

However, if you want to use more recent SVN versions of lxml or want to work
on the code, you will need Pyrex to regenerate the C-code.  If your version of
Pyrex is not patched, you may try to apply the patch that ships with lxml and
is also part of the SVN checkouts.  It should fix the remaining problems.
Apply it to the 0.9.3.1 version of Pyrex, rebuild and install it.  If the
problems persist, please report to the lxml mailing list.  Try to provide a
clear description of what you did to run into the problems and provide the
compiler output that shows the error.

.. Pyrex_: http://www.cosc.canterbury.ac.nz/~greg/python/Pyrex/
