[Python-checkins] commit of r41677 - in python/trunk: Lib/xmlcore/etree/cElementTree.py setup.py

fredrik.lundh python-checkins at python.org
Wed Dec 14 19:46:17 CET 2005


Author: fredrik.lundh
Date: Wed Dec 14 19:46:16 2005
New Revision: 41677

Added:
   python/trunk/Lib/xmlcore/etree/cElementTree.py
Modified:
   python/trunk/setup.py
Log:
added cElementTree/_elementtree build stuff and wrapper module



Added: python/trunk/Lib/xmlcore/etree/cElementTree.py
==============================================================================
--- (empty file)
+++ python/trunk/Lib/xmlcore/etree/cElementTree.py	Wed Dec 14 19:46:16 2005
@@ -0,0 +1,3 @@
+# Wrapper module for _elementtree
+
+from _elementtree import *

Modified: python/trunk/setup.py
==============================================================================
--- python/trunk/setup.py	(original)
+++ python/trunk/setup.py	Wed Dec 14 19:46:16 2005
@@ -841,6 +841,17 @@
                                          ],
                               ))
 
+        # 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',


More information about the Python-checkins mailing list