mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
Fix from Lyle Johnson: add the '--compiler' option.
Also added creation of 'implib_dir', a temporary directory specific to MSVC++ -- but I checked in two ways of fixing it (Lyle's and mine), because I'm not sure which is right.
This commit is contained in:
parent
9668b78b9f
commit
6cd0c43366
1 changed files with 11 additions and 2 deletions
|
@ -67,7 +67,9 @@ class build_ext (Command):
|
||||||
('debug', 'g',
|
('debug', 'g',
|
||||||
"compile/link with debugging information"),
|
"compile/link with debugging information"),
|
||||||
('force', 'f',
|
('force', 'f',
|
||||||
"forcibly build everything (ignore file timestamps"),
|
"forcibly build everything (ignore file timestamps)"),
|
||||||
|
('compiler=', 'c',
|
||||||
|
"specify the compiler type"),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
@ -87,6 +89,7 @@ class build_ext (Command):
|
||||||
self.link_objects = None
|
self.link_objects = None
|
||||||
self.debug = None
|
self.debug = None
|
||||||
self.force = None
|
self.force = None
|
||||||
|
self.compiler = None
|
||||||
|
|
||||||
|
|
||||||
def finalize_options (self):
|
def finalize_options (self):
|
||||||
|
@ -95,6 +98,7 @@ class build_ext (Command):
|
||||||
self.set_undefined_options ('build',
|
self.set_undefined_options ('build',
|
||||||
('build_lib', 'build_lib'),
|
('build_lib', 'build_lib'),
|
||||||
('build_temp', 'build_temp'),
|
('build_temp', 'build_temp'),
|
||||||
|
('compiler', 'compiler'),
|
||||||
('debug', 'debug'),
|
('debug', 'debug'),
|
||||||
('force', 'force'))
|
('force', 'force'))
|
||||||
|
|
||||||
|
@ -169,7 +173,8 @@ class build_ext (Command):
|
||||||
|
|
||||||
# Setup the CCompiler object that we'll use to do all the
|
# Setup the CCompiler object that we'll use to do all the
|
||||||
# compiling and linking
|
# compiling and linking
|
||||||
self.compiler = new_compiler (verbose=self.verbose,
|
self.compiler = new_compiler (compiler=self.compiler,
|
||||||
|
verbose=self.verbose,
|
||||||
dry_run=self.dry_run,
|
dry_run=self.dry_run,
|
||||||
force=self.force)
|
force=self.force)
|
||||||
|
|
||||||
|
@ -340,6 +345,10 @@ class build_ext (Command):
|
||||||
implib_dir = os.path.join(self.build_temp,\
|
implib_dir = os.path.join(self.build_temp,\
|
||||||
self.get_ext_libname(extension_name))
|
self.get_ext_libname(extension_name))
|
||||||
extra_args.append ('/IMPLIB:' + implib_dir)
|
extra_args.append ('/IMPLIB:' + implib_dir)
|
||||||
|
|
||||||
|
# XXX arg, which of these is correct?
|
||||||
|
self.mkpath(implib_dir)
|
||||||
|
self.mkpath(os.path.dirname(implib_dir))
|
||||||
# if MSVC
|
# if MSVC
|
||||||
|
|
||||||
fullname = self.get_ext_fullname (extension_name)
|
fullname = self.get_ext_fullname (extension_name)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue