[Python-bugs-list] [ python-Bugs-451285 ] distutils ignores environment variables

noreply@sourceforge.net noreply@sourceforge.net
Thu, 06 Dec 2001 08:38:53 -0800


Bugs item #451285, was opened at 2001-08-15 12:18
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=451285&group_id=5470

Category: Distutils
Group: Platform-specific
Status: Open
Resolution: None
Priority: 5
Submitted By: Jeremy Hylton (jhylton)
>Assigned to: Thomas Heller (theller)
Summary: distutils ignores environment variables

Initial Comment:
Visual C++ 6.0 sets up environment variables for use 
by command-line users -- MSDEVDIR, INCLUDE, LIB.  It 
also provides VCVARS32.BAT to set these environment 
variables.  They specify where to find cl.exe and its 
header files and libraries.

distutils ignores those in favor of the registry.  I 
think distutils should honor the environment variables 
if they are set.

In my case, the registry was pointing to an old, 
removed install of VC.  I later installed a new 
version in a new location, but that install did not 
modify the registry.


----------------------------------------------------------------------

>Comment By: A.M. Kuchling (akuchling)
Date: 2001-12-06 08:38

Message:
Logged In: YES 
user_id=11375

As a Unix guy, I have no idea whether this is worth doing, 
though it certainly seems reasonable to check for the 
environment variables and use them if present.  Thomas, 
you actually develop for Windows so I'll leave the 
decision up to you.




----------------------------------------------------------------------

Comment By: Tim Peters (tim_one)
Date: 2001-09-05 12:37

Message:
Logged In: YES 
user_id=31435

It would be a reasonable feature request to honor envars if 
the registry info wasn't found.  This wouldn't have helped 
Jeremy, but so it goes (the 2nd time he installed MSVC, he 
didn't install the IDE, and that's why the registry didn't 
get updated; and he didn't properly uninstall his old MSVC 
either, which is why the stale registry entries didn't get 
removed -- and this combination of wrong turns has to be as 
rare as a Unix guy trying to build something on Windows 
<wink>).

----------------------------------------------------------------------

Comment By: Thomas Heller (theller)
Date: 2001-09-05 12:05

Message:
Logged In: YES 
user_id=11105

I'm unsure what to do. On one hand, this request makes 
sense, on the other hand, environment vars are IMO much 
more fragile than registry entries.

I'll assign this to the current distutils maintainer to 
decide what to do.

Or should it be marked as feature request?

----------------------------------------------------------------------

Comment By: Tim Peters (tim_one)
Date: 2001-08-15 12:49

Message:
Logged In: YES 
user_id=31435

Jeremy, do you know how to run regedit?  It's a GUI 
registry browser.  Do Start -> Run and type "regedit" (no 
quotes) then click OK.

I want you to navigate to two places:

HKEY_LOCAL_MACHINE\
Software\
Microsoft\
Devstudio\
6.0\
Build System\

and exactly the same except starting at HKEY_CURRENT_USER 
instead.

My *bet* is that you're going to find that path in both 
places, but that under HKEY_LOCAL_MACHINE it's pointing to 
a wrong place.  This would be a side-effect of not having 
properly uninstalled your previous MSVC.

If that's all true, select the DevStudio node under 
HKEY_LOCAL_MACHINE and then do Edit->Delete.  This will get 
rid of the obsolete registry setting.  Close regedit then.

disutils *should* look under HKEY_CURRENT_USER before 
looking under HKEY_LOCAL_MACHINE, because per-user settings 
are suppused to take precedence over per-machine settings, 
and especially under Win2K.  That appears to be a repeated 
buglet in msvccompiler.py.

----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=451285&group_id=5470