Pages

Monday, September 12, 2011

Compiling and testing lxml2..

The instructions for recompiling lxml seem pretty straightforward. You have to pip install Cython, which is used to convert the .pyx file into a .c file, which then can be gcc compiled. The libxml2-dev and libxslt-dev must be packaged installed.

http://lxml.de/1.3/build.html

git clone https://github.com/lxml/lxml/
sudo apt-get install libxml-dev
sudo apt-get install libxslt-dev
pip install Cython
python setup.py build_ext

If you want to test that the unit tests still pass, you can link the uld type:
cd src/lxml
ln -s ../../build/lib.linux-x86_64-2.6/lxml/etree.so 
cd ../..
python test.py test_etree.py

No comments:

Post a Comment