Workaround PEP 3149 build problems.

This commit is contained in:
Antoine Pitrou 2010-09-04 16:28:00 +00:00
parent a5e3109154
commit 327fd40dde
1 changed files with 7 additions and 1 deletions

View File

@ -152,7 +152,13 @@ class PyBuildExt(build_ext):
def build_extensions(self): def build_extensions(self):
# Detect which modules should be compiled # Detect which modules should be compiled
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() missing = self.detect_modules()
finally:
self.compiler.shared_lib_extension = old_so
# Remove modules that are present on the disabled list # Remove modules that are present on the disabled list
extensions = [ext for ext in self.extensions extensions = [ext for ext in self.extensions