[lxml-dev] Linking against libexslt
Hi, I'd like to include EXSLT support in lxml as it greatly enhances the capabilities of XSLT. It isn't currently enabled, although supported since libxslt 1.0.19. However, this requires linking against libexslt and xslt-config does (intentionally) not help here: http://mail.gnome.org/archives/xslt/2001-October/msg00133.html I don't know if simply adding "-lexslt" works on all systems (that may be the GCC way of doing it), so I added the following to my setup.py: --------------------------- xslt_libs = flags('xslt-config --libs') for i, libname in enumerate(xslt_libs): if 'exslt' in libname: break if 'xslt' in libname: xslt_libs.insert(i, libname.replace('xslt', 'exslt')) break [...] # near the end in setup() call: extra_link_args = xslt_libs --------------------------- This basically replaces "-lxslt" by "-lexslt -lxslt" on my machine (Linux). I hope this is sufficiently platform-independent to make it work on other systems, but I don't have Windows or Mac-OS available to check that this actually works. Since I was working on XSLT in the "resolver-new" branch anyway, I committed it there. I also attached the complete patch that can be applied to the trunk. It includes a new test case for exslt. Could anyone on the Win/Mac platforms please tell me if this is necessary, or if the following (which also works for me) is sufficient: extra_link_args = flags('xslt-config --libs') + ['-lexslt'] Also, could you please verify that the resolver-new branch compiles and that the test cases pass? Please remember that you may want to install Pyrex 0.9.4.1 before compiling from SVN. Thanks, Stefan
participants (1)
-
Stefan Behnel