]> granicus.if.org Git - python/commitdiff
Workaround PEP 3149 build problems.
authorAntoine Pitrou <solipsis@pitrou.net>
Sat, 4 Sep 2010 16:28:00 +0000 (16:28 +0000)
committerAntoine Pitrou <solipsis@pitrou.net>
Sat, 4 Sep 2010 16:28:00 +0000 (16:28 +0000)
setup.py

index 8e51960d03213376ec0b1d77ad94256bb3b4f650..542b928a4db52968b73b0d52456dbaa0fa897218 100644 (file)
--- a/setup.py
+++ b/setup.py
@@ -152,7 +152,13 @@ class PyBuildExt(build_ext):
     def build_extensions(self):
 
         # Detect which modules should be compiled
-        missing = self.detect_modules()
+        old_so = self.compiler.shared_lib_extension
+        # Workaround PEP 3149 stuff
+        self.compiler.shared_lib_extension = os.environ.get("SO", ".so")
+        try:
+            missing = self.detect_modules()
+        finally:
+            self.compiler.shared_lib_extension = old_so
 
         # Remove modules that are present on the disabled list
         extensions = [ext for ext in self.extensions