[Python-checkins] r60043 - python/trunk/setup.py

christian.heimes python-checkins at python.org
Fri Jan 18 10:51:44 CET 2008


Author: christian.heimes
Date: Fri Jan 18 10:51:43 2008
New Revision: 60043

Modified:
   python/trunk/setup.py
Log:
Build _ctypes after the other extensions. Its build process depends
on the _weakref extension (and maybe other modules, too)

Modified: python/trunk/setup.py
==============================================================================
--- python/trunk/setup.py	(original)
+++ python/trunk/setup.py	Fri Jan 18 10:51:43 2008
@@ -101,8 +101,14 @@
         missing = self.detect_modules()
 
         # Remove modules that are present on the disabled list
-        self.extensions = [ext for ext in self.extensions
-                           if ext.name not in disabled_module_list]
+        extensions = [ext for ext in self.extensions
+                      if ext.name not in disabled_module_list]
+        # move ctypes to the end, it depends on other modules
+        ext_map = dict((ext.name, i) for i, ext in enumerate(extensions))
+        if "_ctypes" in ext_map:
+            ctypes = extensions.pop(ext_map["_ctypes"])
+            extensions.append(ctypes)
+        self.extensions = extensions
 
         # Fix up the autodetected modules, prefixing all the source files
         # with Modules/ and adding Python's include directory to the path.


More information about the Python-checkins mailing list