]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Patch 983206: distutils obeys LDSHARED env var. Removed the code in
authorAnthony Baxter <anthonybaxter@gmail.com>
Wed, 13 Oct 2004 15:54:17 +0000 (15:54 +0000)
committerAnthony Baxter <anthonybaxter@gmail.com>
Wed, 13 Oct 2004 15:54:17 +0000 (15:54 +0000)
Python's own setup.py that did the same thing (and tested on Solaris,
where LDSHARED is needed...)

Lib/distutils/sysconfig.py
Misc/ACKS
Misc/NEWS
setup.py

index 0a4e14cc37562b259de47fdb1e07b7d1d277a1f4..8986dc9857266394ee008cc085fcacda67c2b8ef 100644 (file)
@@ -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:
index 978b640e69584a6c201d53ef400f581341d43ecf..cfaf7d64e2cb600e1273ccb77408c9f340d9a92c 100644 (file)
--- 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
index 5c60dca13a51291da43ecb00238a8dc158e3bf1f..58fa7505c1d9712841b7fa7f9ea99a0d9dc45e32 100644 (file)
--- 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
index e3b6b1b2ac40e13614321df3a5aceccb8bcae49e..5450b205aef4a1bb9ba3e8d4b72700622ece7319 100644 (file)
--- 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)