Can I make the Python build use an already-installed version of Expat?

Steve Juranich sjuranic at gmail.com
Tue Jul 19 10:43:53 EDT 2005


I'm running into problems where Python and VTK both ship with their
own distribution of the Expat parser.  As long as you never use the
Python XML package, everything is fine.  But if you try using the
Python XML parser after doing an `import vtk', a nice little message
saying "Segmentation Fault" is your reward.

For now, the workaround is to save the `import vtk' until after I do
all my XML parsing.  However, we're starting to build a rather large
framework using Python and VTK, and I cannot guarantee that the VTK
libraries won't be in memory when some of my XML parsing routines are
called.

I know that the VTK build has an option for forcing it to use an
installation of Expat that's already on the system.  But after looking
at the Python build scripts, I can't find any such option for Python.

Is this at all possible?  I know that there is a way to tell Python to
link to arbitrary libraries, but I don't know how to turn off the
building of the "custom" Expat that comes with Python.

Thanks for any tips, pointers, and insight.
-- 
Steve Juranich
Tucson, AZ
USA



More information about the Python-list mailing list