Difference between revisions of "PyWrapper"

From mx Help Wiki
Jump to: navigation, search
m
m
Line 5: Line 5:
 
=== for OS X (10.3.9) ===
 
=== for OS X (10.3.9) ===
  
Steps 1 and 2 went off without a hitch after I installed the latest version of [http://pythonmac.org/packages/py24-fat/index.html Python] (2.4).
+
Following the steps from the pywrapper install guide.
  
There may be some problems with the default versions of libxml and the xslt libraries.  To update libxml2 and libxslt try looking here for hints:
+
* Steps 1 and 2 went off without a hitch after I installed the latest version of [http://pythonmac.org/packages/py24-fat/index.html Python] (2.4).
  
http://jamesclarke.info/notes/libxml2
+
* Step 3 (lxml)
  
Some of the links at http://xmlsoft.org/XSLT/downloads.html -> downloads don't have the latest version of libxml2 OR libxslt.  I eventually found them here (using 2.6.9):
+
This is the most problematic. There are two dependencies, libxml2 and libxslt, start with the formerHints were firist found here: http://jamesclarke.info/notes/libxml2
  
ftp://ftp.gnome.org/pub/GNOME/sources/libxml2/2.6/
+
== libxml2 ==
 +
 
 +
I eventually found them here (word to those compiling at 3am- 2.6.9 !> 2.6.27) here: ftp://ftp.gnome.org/pub/GNOME/sources/libxml2/2.6/.  The build was configured with:
 +
 
 +
./configure \
 +
--with-python=/Library/Frameworks/Python.framework/Versions/2.4/
 +
 
 +
Followed by:
 +
 
 +
make; sudo make install;
 +
 
 +
Followed by James' renaming (mv) commands.
 +
 
 +
== libxslt ==
  
  
Line 19: Line 32:
  
 
Found 1.1.19 here: ftp://fr.rpmfind.net/pub/libxml/
 
Found 1.1.19 here: ftp://fr.rpmfind.net/pub/libxml/
 +
 +
./configure \
 +
--with-python=/Library/Frameworks/Python.framework/Versions/2.4/ \
 +
--prefix=/usr/local \
 +
--with-libxml-prefix=/usr/local \
 +
--with-libxml-include-prefix=/usr/local/include \
 +
--with-libxml-libs-prefix=/usr/local/lib
 +
 +
  
  
  
I followed James' instructions with this difference in the flag for both libxml2 and libxslt ./configure commands (this vs. the updated version of Python):
 
  
./configure --with-python=/Library/Frameworks/Python.framework/Versions/2.4/
 
  
The other flags need to be included.
 
  
 
'''lxml'''
 
'''lxml'''

Revision as of 02:09, 31 December 2006

Contents

Notes on getting pyWrapper to link to mx

The installation guide is here: http://trac.pywrapper.org/pywrapper/wiki/InstallationGuide

for OS X (10.3.9)

Following the steps from the pywrapper install guide.

  • Steps 1 and 2 went off without a hitch after I installed the latest version of Python (2.4).
  • Step 3 (lxml)

This is the most problematic. There are two dependencies, libxml2 and libxslt, start with the former. Hints were firist found here: http://jamesclarke.info/notes/libxml2

libxml2

I eventually found them here (word to those compiling at 3am- 2.6.9 !> 2.6.27) here: ftp://ftp.gnome.org/pub/GNOME/sources/libxml2/2.6/. The build was configured with:

./configure \
--with-python=/Library/Frameworks/Python.framework/Versions/2.4/ 

Followed by:

make; sudo make install;

Followed by James' renaming (mv) commands.

libxslt

Used xslt 1.1.9. (the default install in OS X 1.3.9), and it failed

Found 1.1.19 here: ftp://fr.rpmfind.net/pub/libxml/

./configure \
--with-python=/Library/Frameworks/Python.framework/Versions/2.4/ \
--prefix=/usr/local \
--with-libxml-prefix=/usr/local \
--with-libxml-include-prefix=/usr/local/include \
--with-libxml-libs-prefix=/usr/local/lib





lxml still dying, the current error is:

In file included from src/lxml/etree.c:27:
/usr/local/include/libxml2/libxml/xmlstring.h:29: error: redefinition of `xmlChar'
<much more barfing>

I'm using

python setup.py build_ext -i -I /usr/local/include/libxml2

Once libxml and libxslt are install try this to see what version is running

xsltproc --version
Personal tools