From: Fredrik Lundh Date: Wed, 14 Dec 2005 18:46:16 +0000 (+0000) Subject: added cElementTree/_elementtree build stuff and wrapper module X-Git-Tag: v2.5a0~1034 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4c86ec651e4f251a9cf5a200d3521ea28566d3a0;p=thirdparty%2FPython%2Fcpython.git added cElementTree/_elementtree build stuff and wrapper module --- diff --git a/Lib/xmlcore/etree/cElementTree.py b/Lib/xmlcore/etree/cElementTree.py new file mode 100644 index 000000000000..a6f127abd5ae --- /dev/null +++ b/Lib/xmlcore/etree/cElementTree.py @@ -0,0 +1,3 @@ +# Wrapper module for _elementtree + +from _elementtree import * diff --git a/setup.py b/setup.py index 8ec8cb0106af..462e76bfb454 100644 --- a/setup.py +++ b/setup.py @@ -841,6 +841,17 @@ class PyBuildExt(build_ext): ], )) + # Fredrik Lundh's cElementTree module. Note that this also + # uses expat (via the CAPI hook in pyexpat). + + if os.path.isfile('Modules/_elementtree.c'): + define_macros.append(('USE_PYEXPAT_CAPI', None)) + exts.append(Extension('_elementtree', + define_macros = define_macros, + include_dirs = [expatinc], + sources = ['_elementtree.c'], + )) + # Hye-Shik Chang's CJKCodecs modules. if have_unicode: exts.append(Extension('_multibytecodec',