Re: [xslt] Patch for Python bindings on MacOSX



On Wed, Jan 14, 2004 at 04:04:44PM +0100, Dakkar wrote:
> 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.

  Hum, I'm wondering if this may lead to troubles with the OS X distro
from http://www.zveno.com/open_source/libxml2xslt.html or "Fink"

> --- 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 ?
>              #

  Okay applied, I hope this won't break for others...

   thanks,

Daniel

-- 
Daniel Veillard      | Red Hat Network https://rhn.redhat.com/
veillard@redhat.com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/



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