diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2005-03-04 13:51:55 (GMT) |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2005-03-04 13:51:55 (GMT) |
commit | ac62bc7e6523f05930649cfc4a7ab663f697fa08 (patch) | |
tree | 0d3eee6e18282ce341a8aa1eae0abd6df02e5088 | |
parent | ace3f61994a7ea5e9284d4297a5a90307be23179 (diff) | |
download | cpython-ac62bc7e6523f05930649cfc4a7ab663f697fa08.zip cpython-ac62bc7e6523f05930649cfc4a7ab663f697fa08.tar.gz cpython-ac62bc7e6523f05930649cfc4a7ab663f697fa08.tar.bz2 |
Patch #1075887: Don't require MSVC in distutils if there is nothing
to build. Will backport to 2.4
-rw-r--r-- | Lib/distutils/msvccompiler.py | 6 | ||||
-rw-r--r-- | Misc/NEWS | 3 |
2 files changed, 9 insertions, 0 deletions
diff --git a/Lib/distutils/msvccompiler.py b/Lib/distutils/msvccompiler.py index 89a75b3..0161393 100644 --- a/Lib/distutils/msvccompiler.py +++ b/Lib/distutils/msvccompiler.py @@ -211,6 +211,9 @@ class MSVCCompiler (CCompiler) : self.__macros = MacroExpander(self.__version) else: self.__root = r"Software\Microsoft\Devstudio" + self.initialized = False + + def initialize(self): self.__paths = self.get_msvc_paths("path") if len (self.__paths) == 0: @@ -290,6 +293,7 @@ class MSVCCompiler (CCompiler) : output_dir=None, macros=None, include_dirs=None, debug=0, extra_preargs=None, extra_postargs=None, depends=None): + if not self.initialized: self.initialize() macros, objects, extra_postargs, pp_opts, build = \ self._setup_compile(output_dir, macros, include_dirs, sources, depends, extra_postargs) @@ -381,6 +385,7 @@ class MSVCCompiler (CCompiler) : debug=0, target_lang=None): + if not self.initialized: self.initialize() (objects, output_dir) = self._fix_object_args (objects, output_dir) output_filename = \ self.library_filename (output_libname, output_dir=output_dir) @@ -414,6 +419,7 @@ class MSVCCompiler (CCompiler) : build_temp=None, target_lang=None): + if not self.initialized: self.initialize() (objects, output_dir) = self._fix_object_args (objects, output_dir) (libraries, library_dirs, runtime_library_dirs) = \ self._fix_lib_args (libraries, library_dirs, runtime_library_dirs) @@ -40,6 +40,9 @@ Extension Modules Library ------- +- Patch #1075887: Don't require MSVC in distutils if there is nothing + to build. + - Patch #1103407: Properly deal with tarfile iterators when untarring symbolic links on Windows. |