mirror of
https://github.com/python/cpython.git
synced 2025-11-03 11:23:31 +00:00
Define the 'executables' class attribute so the CCompiler constructor
doesn't blow up. We don't currently use the 'set_executables()' bureaucracy, although it would be nice to do so for consistency with UnixCCompiler.
This commit is contained in:
parent
e401e15d18
commit
992c8f9dab
1 changed files with 8 additions and 1 deletions
|
|
@ -167,6 +167,13 @@ class MSVCCompiler (CCompiler) :
|
||||||
|
|
||||||
compiler_type = 'msvc'
|
compiler_type = 'msvc'
|
||||||
|
|
||||||
|
# Just set this so CCompiler's constructor doesn't barf. We currently
|
||||||
|
# don't use the 'set_executables()' bureaucracy provided by CCompiler,
|
||||||
|
# as it really isn't necessary for this sort of single-compiler class.
|
||||||
|
# Would be nice to have a consistent interface with UnixCCompiler,
|
||||||
|
# though, so it's worth thinking about.
|
||||||
|
executables = {}
|
||||||
|
|
||||||
# Private class data (need to distinguish C from C++ source for compiler)
|
# Private class data (need to distinguish C from C++ source for compiler)
|
||||||
_c_extensions = ['.c']
|
_c_extensions = ['.c']
|
||||||
_cpp_extensions = ['.cc','.cpp']
|
_cpp_extensions = ['.cc','.cpp']
|
||||||
|
|
@ -295,7 +302,7 @@ class MSVCCompiler (CCompiler) :
|
||||||
if extra_postargs:
|
if extra_postargs:
|
||||||
lib_args.extend (extra_postargs)
|
lib_args.extend (extra_postargs)
|
||||||
try:
|
try:
|
||||||
self.spawn ([self.link] + ld_args)
|
self.spawn ([self.lib] + lib_args)
|
||||||
except DistutilsExecError, msg:
|
except DistutilsExecError, msg:
|
||||||
raise LibError, msg
|
raise LibError, msg
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue