Skip to content

Commit 976faf9

Browse files
committed
Merged revisions 72593 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r72593 | benjamin.peterson | 2009-05-12 16:06:05 -0500 (Tue, 12 May 2009) | 1 line the compiler attribute is used in setup.py; can't rename ........
1 parent 12f29ff commit 976faf9

1 file changed

Lines changed: 14 additions & 14 deletions

File tree

‎Lib/distutils/command/build_ext.py‎

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -310,38 +310,38 @@ def run(self):
310310

311311
# Setup the CCompiler object that we'll use to do all the
312312
# compiling and linking
313-
self._compiler = new_compiler(compiler=self.compiler,
313+
self.compiler = new_compiler(compiler=None,
314314
verbose=self.verbose,
315315
dry_run=self.dry_run,
316316
force=self.force)
317-
customize_compiler(self._compiler)
317+
customize_compiler(self.compiler)
318318
# If we are cross-compiling, init the compiler now (if we are not
319319
# cross-compiling, init would not hurt, but people may rely on
320320
# late initialization of compiler even if they shouldn't...)
321321
if os.name == 'nt' and self.plat_name != get_platform():
322-
self._compiler.initialize(self.plat_name)
322+
self.compiler.initialize(self.plat_name)
323323

324324
# And make sure that any compile/link-related options (which might
325325
# come from the command-line or from the setup script) are set in
326326
# that CCompiler object -- that way, they automatically apply to
327327
# all compiling and linking done here.
328328
if self.include_dirs is not None:
329-
self._compiler.set_include_dirs(self.include_dirs)
329+
self.compiler.set_include_dirs(self.include_dirs)
330330
if self.define is not None:
331331
# 'define' option is a list of (name,value) tuples
332332
for (name, value) in self.define:
333-
self._compiler.define_macro(name, value)
333+
self.compiler.define_macro(name, value)
334334
if self.undef is not None:
335335
for macro in self.undef:
336-
self._compiler.undefine_macro(macro)
336+
self.compiler.undefine_macro(macro)
337337
if self.libraries is not None:
338-
self._compiler.set_libraries(self.libraries)
338+
self.compiler.set_libraries(self.libraries)
339339
if self.library_dirs is not None:
340-
self._compiler.set_library_dirs(self.library_dirs)
340+
self.compiler.set_library_dirs(self.library_dirs)
341341
if self.rpath is not None:
342-
self._compiler.set_runtime_library_dirs(self.rpath)
342+
self.compiler.set_runtime_library_dirs(self.rpath)
343343
if self.link_objects is not None:
344-
self._compiler.set_link_objects(self.link_objects)
344+
self.compiler.set_link_objects(self.link_objects)
345345

346346
# Now actually compile and link everything.
347347
self.build_extensions()
@@ -502,7 +502,7 @@ def build_extension(self, ext):
502502
for undef in ext.undef_macros:
503503
macros.append((undef,))
504504

505-
objects = self._compiler.compile(sources,
505+
objects = self.compiler.compile(sources,
506506
output_dir=self.build_temp,
507507
macros=macros,
508508
include_dirs=ext.include_dirs,
@@ -529,9 +529,9 @@ def build_extension(self, ext):
529529
extra_args = ext.extra_link_args or []
530530

531531
# Detect target language, if not provided
532-
language = ext.language or self._compiler.detect_language(sources)
532+
language = ext.language or self.compiler.detect_language(sources)
533533

534-
self._compiler.link_shared_object(
534+
self.compiler.link_shared_object(
535535
objects, ext_path,
536536
libraries=self.get_libraries(ext),
537537
library_dirs=ext.library_dirs,
@@ -689,7 +689,7 @@ def get_libraries(self, ext):
689689
# Append '_d' to the python import library on debug builds.
690690
if sys.platform == "win32":
691691
from distutils.msvccompiler import MSVCCompiler
692-
if not isinstance(self._compiler, MSVCCompiler):
692+
if not isinstance(self.compiler, MSVCCompiler):
693693
template = "python%d%d"
694694
if self.debug:
695695
template = template + '_d'

0 commit comments

Comments
 (0)