Kaydet (Commit) 22dcf66f authored tarafından Anthony Baxter's avatar Anthony Baxter

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...)
üst 8a560dee
...@@ -153,6 +153,8 @@ def customize_compiler(compiler): ...@@ -153,6 +153,8 @@ def customize_compiler(compiler):
cc = os.environ['CC'] cc = os.environ['CC']
if os.environ.has_key('CXX'): if os.environ.has_key('CXX'):
cxx = os.environ['CXX'] cxx = os.environ['CXX']
if os.environ.has_key('LDSHARED'):
ldshared = os.environ['LDSHARED']
if os.environ.has_key('CPP'): if os.environ.has_key('CPP'):
cpp = os.environ['CPP'] cpp = os.environ['CPP']
else: else:
......
...@@ -499,6 +499,7 @@ Just van Rossum ...@@ -499,6 +499,7 @@ Just van Rossum
Hugo van Rossum Hugo van Rossum
Saskia van Rossum Saskia van Rossum
Donald Wallace Rouse II Donald Wallace Rouse II
Liam Routt
Audun S. Runde Audun S. Runde
Jeff Rush Jeff Rush
Sam Rushing Sam Rushing
......
...@@ -47,6 +47,9 @@ Extension modules ...@@ -47,6 +47,9 @@ Extension modules
Library 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. - Added Peter Astrand's subprocess.py module. See PEP 324 for details.
- time.strptime() now properly escapes timezones and all other locale-specific - time.strptime() now properly escapes timezones and all other locale-specific
......
...@@ -167,15 +167,12 @@ class PyBuildExt(build_ext): ...@@ -167,15 +167,12 @@ class PyBuildExt(build_ext):
# those environment variables passed into the setup.py phase. Here's # those environment variables passed into the setup.py phase. Here's
# a small set of useful ones. # a small set of useful ones.
compiler = os.environ.get('CC') compiler = os.environ.get('CC')
linker_so = os.environ.get('LDSHARED')
args = {} args = {}
# unfortunately, distutils doesn't let us provide separate C and C++ # unfortunately, distutils doesn't let us provide separate C and C++
# compilers # compilers
if compiler is not None: if compiler is not None:
(ccshared,opt,base) = sysconfig.get_config_vars('CCSHARED','OPT','BASECFLAGS') (ccshared,opt,base) = sysconfig.get_config_vars('CCSHARED','OPT','BASECFLAGS')
args['compiler_so'] = compiler + ' ' + opt + ' ' + ccshared + ' ' + base args['compiler_so'] = compiler + ' ' + opt + ' ' + ccshared + ' ' + base
if linker_so is not None:
args['linker_so'] = linker_so
self.compiler.set_executables(**args) self.compiler.set_executables(**args)
build_ext.build_extensions(self) build_ext.build_extensions(self)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment