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

Skip to content

Commit e401e15

Browse files
committed
Removed some debugging code that slipped into the last checkin.
Ensure that 'extra_args' (whether compile or link args) is never None.
1 parent f46a688 commit e401e15

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

Lib/distutils/command/build_ext.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -188,8 +188,7 @@ def run (self):
188188

189189
# Setup the CCompiler object that we'll use to do all the
190190
# compiling and linking
191-
self.compiler = new_compiler (#compiler=self.compiler,
192-
compiler="msvc",
191+
self.compiler = new_compiler (compiler=self.compiler,
193192
verbose=self.verbose,
194193
dry_run=self.dry_run,
195194
force=self.force)
@@ -393,7 +392,7 @@ def build_extensions (self):
393392
# The environment variable should take precedence, and
394393
# any sensible compiler will give precendence to later
395394
# command line args. Hence we combine them in order:
396-
extra_args = ext.extra_compile_args
395+
extra_args = ext.extra_compile_args or []
397396

398397
# XXX and if we support CFLAGS, why not CC (compiler
399398
# executable), CPPFLAGS (pre-processor options), and LDFLAGS
@@ -415,7 +414,7 @@ def build_extensions (self):
415414
# that go into the mix.
416415
if ext.extra_objects:
417416
objects.extend (ext.extra_objects)
418-
extra_args = ext.extra_link_args
417+
extra_args = ext.extra_link_args or []
419418

420419
# Bunch of fixing-up we have to do for Microsoft's linker.
421420
if self.compiler.compiler_type == 'msvc':

0 commit comments

Comments
 (0)