summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnthony Baxter <anthonybaxter@gmail.com>2004-10-13 15:54:17 (GMT)
committerAnthony Baxter <anthonybaxter@gmail.com>2004-10-13 15:54:17 (GMT)
commit22dcf66f849c50c8bcb08537c02e8242ae6a0f4a (patch)
tree9deca02f0530285ed09d01a7c87d6592770240cf
parent8a560dee7291f75968eea773c1258f2c25b5a81f (diff)
downloadcpython-22dcf66f849c50c8bcb08537c02e8242ae6a0f4a.zip
cpython-22dcf66f849c50c8bcb08537c02e8242ae6a0f4a.tar.gz
cpython-22dcf66f849c50c8bcb08537c02e8242ae6a0f4a.tar.bz2
Patch 983206: distutils obeys LDSHARED env var. Removed the code in
Python's own setup.py that did the same thing (and tested on Solaris, where LDSHARED is needed...)
-rw-r--r--Lib/distutils/sysconfig.py2
-rw-r--r--Misc/ACKS1
-rw-r--r--Misc/NEWS3
-rw-r--r--setup.py3
4 files changed, 6 insertions, 3 deletions
diff --git a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py
index 0a4e14c..8986dc9 100644
--- a/Lib/distutils/sysconfig.py
+++ b/Lib/distutils/sysconfig.py
@@ -153,6 +153,8 @@ def customize_compiler(compiler):
cc = os.environ['CC']
if os.environ.has_key('CXX'):
cxx = os.environ['CXX']
+ if os.environ.has_key('LDSHARED'):
+ ldshared = os.environ['LDSHARED']
if os.environ.has_key('CPP'):
cpp = os.environ['CPP']
else:
diff --git a/Misc/ACKS b/Misc/ACKS
index 978b640..cfaf7d6 100644
--- a/Misc/ACKS
+++ b/Misc/ACKS
@@ -499,6 +499,7 @@ Just van Rossum
Hugo van Rossum
Saskia van Rossum
Donald Wallace Rouse II
+Liam Routt
Audun S. Runde
Jeff Rush
Sam Rushing
diff --git a/Misc/NEWS b/Misc/NEWS
index 5c60dca..58fa750 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -47,6 +47,9 @@ Extension modules
Library
-------
+- Patch 983206: distutils now obeys environment variable LDSHARED, if
+ it is set.
+
- Added Peter Astrand's subprocess.py module. See PEP 324 for details.
- time.strptime() now properly escapes timezones and all other locale-specific
diff --git a/setup.py b/setup.py
index e3b6b1b..5450b20 100644
--- a/setup.py
+++ b/setup.py
@@ -167,15 +167,12 @@ class PyBuildExt(build_ext):
# those environment variables passed into the setup.py phase. Here's
# a small set of useful ones.
compiler = os.environ.get('CC')
- linker_so = os.environ.get('LDSHARED')
args = {}
# unfortunately, distutils doesn't let us provide separate C and C++
# compilers
if compiler is not None:
(ccshared,opt,base) = sysconfig.get_config_vars('CCSHARED','OPT','BASECFLAGS')
args['compiler_so'] = compiler + ' ' + opt + ' ' + ccshared + ' ' + base
- if linker_so is not None:
- args['linker_so'] = linker_so
self.compiler.set_executables(**args)
build_ext.build_extensions(self)