mirror of
https://github.com/python/cpython.git
synced 2025-10-17 04:08:28 +00:00
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...)
This commit is contained in:
parent
8a560dee72
commit
22dcf66f84
4 changed files with 6 additions and 3 deletions
3
setup.py
3
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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue