Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 992c8f9

Browse files
committed
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.
1 parent e401e15 commit 992c8f9

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

Lib/distutils/msvccompiler.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,13 @@ class MSVCCompiler (CCompiler) :
167167

168168
compiler_type = 'msvc'
169169

170+
# Just set this so CCompiler's constructor doesn't barf. We currently
171+
# don't use the 'set_executables()' bureaucracy provided by CCompiler,
172+
# as it really isn't necessary for this sort of single-compiler class.
173+
# Would be nice to have a consistent interface with UnixCCompiler,
174+
# though, so it's worth thinking about.
175+
executables = {}
176+
170177
# Private class data (need to distinguish C from C++ source for compiler)
171178
_c_extensions = ['.c']
172179
_cpp_extensions = ['.cc','.cpp']
@@ -295,7 +302,7 @@ def create_static_lib (self,
295302
if extra_postargs:
296303
lib_args.extend (extra_postargs)
297304
try:
298-
self.spawn ([self.link] + ld_args)
305+
self.spawn ([self.lib] + lib_args)
299306
except DistutilsExecError, msg:
300307
raise LibError, msg
301308

0 commit comments

Comments
 (0)