summaryrefslogtreecommitdiffstats
path: root/setup.py
diff options
context:
space:
mode:
authordoko@ubuntu.com <doko@ubuntu.com>2013-03-21 20:31:41 (GMT)
committerdoko@ubuntu.com <doko@ubuntu.com>2013-03-21 20:31:41 (GMT)
commit1621d77fc8fb2385d26c7de39f55df60426ec6ec (patch)
tree0a31742c8b8aed6453b95f92a77f50f66d5085cd /setup.py
parentbd2d30cf31c61843645a96a377aa0573052c4972 (diff)
parentd5537d071cc2acada7220431a0eea5931c2e8a2d (diff)
downloadcpython-1621d77fc8fb2385d26c7de39f55df60426ec6ec.zip
cpython-1621d77fc8fb2385d26c7de39f55df60426ec6ec.tar.gz
cpython-1621d77fc8fb2385d26c7de39f55df60426ec6ec.tar.bz2
- Issue #16754: Fix the incorrect shared library extension on linux. Introduce
two makefile macros SHLIB_SUFFIX and EXT_SUFFIX. SO now has the value of SHLIB_SUFFIX again (as in 2.x and 3.1). The SO macro is removed in 3.4.
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py13
1 files changed, 4 insertions, 9 deletions
diff --git a/setup.py b/setup.py
index 7b7e03e..d4183d4 100644
--- a/setup.py
+++ b/setup.py
@@ -169,13 +169,7 @@ class PyBuildExt(build_ext):
def build_extensions(self):
# 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()
- finally:
- self.compiler.shared_lib_extension = old_so
+ missing = self.detect_modules()
# Remove modules that are present on the disabled list
extensions = [ext for ext in self.extensions
@@ -2055,7 +2049,8 @@ class PyBuildInstallLib(install_lib):
# mode 644 unless they are a shared library in which case they will get
# mode 755. All installed directories will get mode 755.
- so_ext = sysconfig.get_config_var("SO")
+ # this is works for EXT_SUFFIX too, which ends with SHLIB_SUFFIX
+ shlib_suffix = sysconfig.get_config_var("SHLIB_SUFFIX")
def install(self):
outfiles = install_lib.install(self)
@@ -2070,7 +2065,7 @@ class PyBuildInstallLib(install_lib):
for filename in files:
if os.path.islink(filename): continue
mode = defaultMode
- if filename.endswith(self.so_ext): mode = sharedLibMode
+ if filename.endswith(self.shlib_suffix): mode = sharedLibMode
log.info("changing mode of %s to %o", filename, mode)
if not self.dry_run: os.chmod(filename, mode)