On 20/10/09 03:14, Chris Mohler wrote:
I have a client who needs a later version of lxml to be picked up by Inkscape* on OS X. Unfortunately, I do not have access to OS X, so I'm not sure how to best acheive this - any advice would be most welcome. I'm not sure what version of OS X, but I'm guessing the procedure will be somewhat similar on all of them...
A) he can install the lxml and numpy as any other python module into the Python Framework that is part of the OS X installation. You'd have to test if it's necessary to remove/rename the 'Contents/Resources/python' directory inside the application bundle - I don't know since I never touched the osx installed python version. If he didn't upgrade to Snow Leopard the default python install is v2.5.1. Note that this is not recommended according to the installation notes on the lxml website http://codespeak.net/lxml/installation.html#macos-x.
Inkscape Wiki: Pre-compiling the Python modules http://wiki.inkscape.org/wiki/index.php/CompilingMacOsX#Pre-compiling_the_Python_modules
B) If he is comfortable using commandline tools - MacPorts is a port manager that lets you install python and related modules into a separate tree independent from the osx installation. Inkscape's launcher script has $PATH for a default MacPorts installation included and uses the MacPorts python binary if installed instead of the OS X Framework version. I am not sure if you need to comment out the $PYTHONPATH in the launcher script or if the (updated) MacPorts python modules are seen first by the MacPorts python binary anyway (Michael or JiHO certainly know more about the details).
1) install MacPorts (DMG available) http://www.macports.org/ 2) use Terminal.app (shell): $ sudo port self-update $ sudo port install py26-lxml $ sudo port install py26-numpy should retrieve, install and activate all dependencies needed, including python 2.6.x itself. Default prefix is '/opt/local'. 3) test Inkscape.app (0.47pre4) with the "debug" extension (bug #448285) to see which modules are loaded. If needed, add/change $PYTHONHOME/$PYTHONPATH in 'Contents/Resources/bin/inkscape' (shell script) inside the application bundle.
SVN macosx packaging - launcher script: http://inkscape.svn.sourceforge.net/viewvc/inkscape/inkscape/trunk/packaging/macosx/Resources/bin/inkscape?view=markup
C) ? bug Michael to update and rebuild the python modules bundled with Inkscape 0.47 ?
hth, ~suv
@ Michael, JiHO - please correct me if I am wrong or missed an easier way ;-)