mirror of
https://github.com/python/cpython.git
synced 2025-11-03 03:22:27 +00:00
Only import msvccompiler on win32 platforms.
This commit is contained in:
parent
83ccb4e011
commit
c01b350d36
1 changed files with 11 additions and 11 deletions
|
|
@ -624,17 +624,17 @@ class build_ext (Command):
|
||||||
# pyconfig.h that MSVC groks. The other Windows compilers all seem
|
# pyconfig.h that MSVC groks. The other Windows compilers all seem
|
||||||
# to need it mentioned explicitly, though, so that's what we do.
|
# to need it mentioned explicitly, though, so that's what we do.
|
||||||
# Append '_d' to the python import library on debug builds.
|
# Append '_d' to the python import library on debug builds.
|
||||||
from distutils.msvccompiler import MSVCCompiler
|
if sys.platform == "win32":
|
||||||
if sys.platform == "win32" and \
|
from distutils.msvccompiler import MSVCCompiler
|
||||||
not isinstance(self.compiler, MSVCCompiler):
|
if not isinstance(self.compiler, MSVCCompiler):
|
||||||
template = "python%d%d"
|
template = "python%d%d"
|
||||||
if self.debug:
|
if self.debug:
|
||||||
template = template + '_d'
|
template = template + '_d'
|
||||||
pythonlib = (template %
|
pythonlib = (template %
|
||||||
(sys.hexversion >> 24, (sys.hexversion >> 16) & 0xff))
|
(sys.hexversion >> 24, (sys.hexversion >> 16) & 0xff))
|
||||||
# don't extend ext.libraries, it may be shared with other
|
# don't extend ext.libraries, it may be shared with other
|
||||||
# extensions, it is a reference to the original list
|
# extensions, it is a reference to the original list
|
||||||
return ext.libraries + [pythonlib]
|
return ext.libraries + [pythonlib]
|
||||||
elif sys.platform == "os2emx":
|
elif sys.platform == "os2emx":
|
||||||
# EMX/GCC requires the python library explicitly, and I
|
# EMX/GCC requires the python library explicitly, and I
|
||||||
# believe VACPP does as well (though not confirmed) - AIM Apr01
|
# believe VACPP does as well (though not confirmed) - AIM Apr01
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue