On 20/10/09 09:25, Michael Wybrow wrote:
On 20/10/2009, at 12:13 AM, ~suv wrote:
Arrgh - I was too fast to respond or too sloppy in testing! Obviously the path to the python installation (inside the MacPorts tree) is hardcoded into the modules - if I rename the installation directory (I have not used the default prefix '/opt/local') the python extension fail with the ominous 'fantastic lxml wrapper for libxml' story :(
Will try again tomorrow, but might need some help as well on how to create 'portable' python module packages...
I'm not sure how the original ones were created to be portable (I think JiHO built them). They certainly don't look portable since some link to dylibs in /opt/local. I may have broken them in that respect when I removed the DYLD_LIBRARY_PATH variable, though they appear to work on Leopard installations fine. This might be something to do with the different versions and architectures being linked to different libraries. That is, the ones I have tested on Leopard might only be linked to the system libraries and work, but the others to non-present Macports libraries.
One cause on 10.5.8 is the missing DYLD_LIBRARY_PATH variable in the packages from sf.net!
Locally for testing I don't use the install_path rewriting (my MacPorts $PREFIX is too short and I can't re-install and upgrade to MacPorts 1.8.1 due to a bug still unfixed... waiting for 1.8.2 ;-).
So I tested with a default application bundle built from SVN, (using the original launcher script with its default $PATH settings and 'export DYLD_LIBRARY_PATH="$TOP/lib"') and replaced the Python site-packages for i386 and python 2.5/2.6 (included from the DMG on modevia) with newer modules copied from the MacPorts tree.
Before launching this app I renamed the MacPorts tree so that any install_path reference would break. Inkscape-SVN.app nevertheless loads the new modules without error and reports the new lxml version (2.2.2) - using the apple-supplied python v2.5.1.
I have a patch (attached) for the packaging script that does the path rewriting on the python files, but I'm not convinced it works completely since I was testing it on SnowLeopard and still couldn't get the extensions to run, as per my last email in the other thread. Anyway, that's as far as I got last time I had a chance to look at the problem.
I will try if I can apply the 'fixlib' function to the new python modules manually and report back if I can get it to run with Inkscape-SVN.app on 10.5.8.
~suv