New submission from zouguangxian:

It seems that the directory information of MSVC8 *just* can be got from 
environment variable instead of registry. 

This patch make me compile pywin32 with MSVC8(VS 2005).

----------
files: msvccompiler.py.diff
messages: 57530
nosy: weck
severity: normal
status: open
title: patch to make msvccompiler.py work with vs 2005(MSVC8)
type: compile error
versions: Python 2.5
Added file: http://bugs.python.org/file8752/msvccompiler.py.diff

__________________________________
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1447>
__________________________________
Index: Lib/distutils/msvccompiler.py
===================================================================
--- Lib/distutils/msvccompiler.py       (revision 58978)
+++ Lib/distutils/msvccompiler.py       (working copy)
@@ -262,6 +262,7 @@
             self.mc = "mc.exe"
         else:
             self.__paths = self.get_msvc_paths("path")
+            print self.__paths
 
             if len (self.__paths) == 0:
                 raise DistutilsPlatformError, \
@@ -610,6 +611,18 @@
         if not _can_read_reg:
             return []
 
+        path = path.upper()
+        if self.__version == 8:
+            if path == "PATH":
+                return string.split(os.environ["PATH"], ";")
+            elif path == "LIBRARY":
+                return string.split(os.environ["LIB"], ";") + \
+                        string.split(os.environ["LIBPATH"], ";")
+            elif path == "INCLUDE":
+                return string.split(os.environ["INCLUDE"], ";")
+                
+
+        print self.__root, self.__version
         path = path + " dirs"
         if self.__version >= 7:
             key = (r"%s\%0.1f\VC\VC_OBJECTS_PLATFORM_INFO\Win32\Directories"
@@ -618,6 +631,7 @@
             key = (r"%s\6.0\Build System\Components\Platforms"
                    r"\Win32 (%s)\Directories" % (self.__root, platform))
 
+        print key
         for base in HKEYS:
             d = read_values(base, key)
             if d:
_______________________________________________
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to