[Patches] [ python-Patches-780821 ] More robust MSVC6 finder
SourceForge.net
noreply at sourceforge.net
Tue Oct 21 07:10:09 EDT 2003
Patches item #780821, was opened at 2003-07-31 13:50
Message generated for change (Comment added) made by murraysteele
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=780821&group_id=5470
Category: Distutils and setup.py
Group: Python 2.3
Status: Open
Resolution: None
Priority: 5
Submitted By: Garth T Kidd (gtk)
Assigned to: Jeremy Hylton (jhylton)
Summary: More robust MSVC6 finder
Initial Comment:
My VS6 install on XP didn't set the
r"Software\Microsoft\Devstudio\6.0\Build System"
registry key relied upon by distutils.msvccompiler to find
the compiler and linker executable.
As a backup to the registry paths, this patch looks up
the MSVCDIR environment variable and ensures its
basename is appropriate for the Python build version:
if self.__version == 6:
matchbase = 'vc98'
elif self.__version == 7:
matchbase = 'vc7'
Works fine on my machine, so long as I run
VCVARS32.BAT, and fails appropriately if I ran the wrong
VCVARS32.BAT by mistake (I have Visual Studio Net
2003 also installed).
The patch should be applied to distutils/msvccompiler.py.
----------------------------------------------------------------------
Comment By: Murray Steele (murraysteele)
Date: 2003-10-21 12:10
Message:
Logged In: YES
user_id=891425
Having come across this problem myself, it seems that MSVC 6
doesn't create the r"Software\Microsoft\Devstudio\6.0\Build
System" registry keys until *after* you run the actual
Visual Studio IDE. So just doing a plain install and never
running the IDE isn't enough.
This isn't much of a fix, just some kind of documentation
incase it bites some other fumbling developer in the future.
Someone somewhere else
(http://sourceforge.net/tracker/?func=detail&atid=105470&aid=451285&group_id=5470)
suggested using the Environment Variables as well as the
registry keys in distutils to check for compiler
correctness. Seems like a plan to me.
And there is some more chat about this problem here
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=614770&group_id=5470
----------------------------------------------------------------------
Comment By: Martin v. Löwis (loewis)
Date: 2003-08-01 08:16
Message:
Logged In: YES
user_id=21627
I'm curious, though, how you installed VS6 without getting
the registry settings. Doesn't this mean your installation
of VS6 is broken?
----------------------------------------------------------------------
Comment By: Garth T Kidd (gtk)
Date: 2003-08-01 05:06
Message:
Logged In: YES
user_id=59803
WARNING: the first patch contains a typo. s/nstring/string/
and you'll be fine. New version attached.
----------------------------------------------------------------------
Comment By: Jeremy Hylton (jhylton)
Date: 2003-07-31 23:09
Message:
Logged In: YES
user_id=31392
I've desired the same functionality in the past.
----------------------------------------------------------------------
Comment By: Garth T Kidd (gtk)
Date: 2003-07-31 13:52
Message:
Logged In: YES
user_id=59803
Whups. The patch didn't attach.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=780821&group_id=5470
More information about the Patches
mailing list