[xslt] Patch for Python bindings on MacOSX



Problem: the Python interpreter on MacOSX does not have the 'dl'
module, so the importing mechanism in libxslt.py does not have a way
to load the correct libxml2.dylib

I have made the attached patch, adding a special case (as there
already is one for Linux and Solaris). Now it works for me, but with a
consideration: the Apple-supplied python links against Apple's
libraries, which link to a libxml2.2.dylib

If libxslt were compiled against it, everything would work, but since
it probably is not (Apple gives no headers), I compiled both libraries
myself, and got segfaults. Now I invoke python with:

 $ DYLD_LIBRARY_PATH=/sw/lib python

since my libxml2 is in /sw/lib, it gets loaded instead of the
Apple-given one, and everything works.

Hope this helps.

-- 

	Dakkar - <Mobilis in mobile>
	GPG public key fingerprint = A071 E618 DD2C 5901 9574
	                             6FE2 40EA 9883 7519 3F88
	                    key id = 0x75193F88

--- libxslt.py.orig	Wed Jan 14 16:19:01 2004
+++ libxslt.py	Wed Dec 24 17:33:42 2003
@@ -20,6 +20,9 @@
             if osname == 'Linux' or osname == 'SunOS':
                 RTLD_GLOBAL = 0x00100
                 RTLD_NOW = 0x00002
+            elif osname == 'Darwin':
+                RTLD_GLOBAL = 0x8
+                RTLD_NOW = 0x2
             #
             # is there a better method ?
             #


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]