From 327fd40dde2a22fd1162dfda64bc6c8c96552b71 Mon Sep 17 00:00:00 2001 From: Antoine Pitrou Date: Sat, 4 Sep 2010 16:28:00 +0000 Subject: [PATCH] Workaround PEP 3149 build problems. --- setup.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 8e51960d032133..542b928a4db529 100644 --- a/setup.py +++ b/setup.py @@ -152,7 +152,13 @@ def __init__(self, dist): 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