[Python-checkins] python/dist/src/Lib/distutils msvccompiler.py, 1.64, 1.64.2.1

loewis at users.sourceforge.net loewis at users.sourceforge.net
Fri Mar 4 14:51:57 CET 2005


Update of /cvsroot/python/python/dist/src/Lib/distutils
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11092/Lib/distutils

Modified Files:
      Tag: release24-maint
	msvccompiler.py 
Log Message:
Patch #1075887: Don't require MSVC in distutils if there is nothing
to build. Will backport to 2.4


Index: msvccompiler.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/distutils/msvccompiler.py,v
retrieving revision 1.64
retrieving revision 1.64.2.1
diff -u -d -r1.64 -r1.64.2.1
--- msvccompiler.py	28 Nov 2004 01:10:01 -0000	1.64
+++ msvccompiler.py	4 Mar 2005 13:51:55 -0000	1.64.2.1
@@ -211,6 +211,9 @@
             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 @@
                 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 @@
                            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 @@
               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)



More information about the Python-checkins mailing list