[XML-SIG] expat missing in Sun Python?

Fred L. Drake, Jr. fdrake@acm.org
Fri, 13 Sep 2002 11:52:14 -0400


Norman Samuelson writes:
 > It appears that expat (or is it pyexpat) is missing.

It does look that way.  Here's what's probably happening; you'll be
able to check by looking for some files on your system.

Python includes an extension that allows it to use Expat.  On Windows,
the Expat DLL is bundled as well, so Expat will always be available on
that platform.  On Unix, the "pyexpat" extension will be built only if
the setup.py script bundled with the Python sources can locate Expat
when Python is built.

If the system has Expat installed, you will be able to locate either
expat.h or xmlparse.h (depending on the version of Expat) in the
system include directory, and either libexpat.{a,so} or libxmlparse.a
and libxmltok.a in one of the system libraries directories.  If Expat
is located somewhere else on the system, you will need to modify the
setup.py script to allow Python to build the "pyexpat" extension using
that version of Expat.

Recent versions of PyXML bundle the complete Expat source code and do
not require a separate installation of Expat.  This approach is being
adopted for Python as well, and will be incorporated in Python 2.3.

 > I would appreciate it if someone could tell me where to find the missing 
 > piece, or a newer version that includes that missing piece.

Perhaps the simplest approach to getting XML support at this point is
to install the latest version of PyXML.  Version 0.8.1 is expected in
the next few days, and includes many improvements in xml.dom.minidom
and the latest version of Expat (1.95.5).


  -Fred

-- 
Fred L. Drake, Jr.  <fdrake at acm.org>
PythonLabs at Zope Corporation