[Distutils] WinNT and distutils
Mon, 31 Jan 2000 15:25:01 -0800
> Surely msvccompiler can tell if a particular file (say cl.exe) isn't in
> any of the well known places. Then it can just issue the correct
> commands with the path attached or tell the user it can't find
> cl.exe/link.exe and then ask for vcvars32.bat to be run first. I assume
> we're not going to search all known drives for the correct exe's.
I agree. IMO, we could take the following approach:
* Look in C:\Program Files\The default place\...
* Look in \Program Files\The default place\...
* Try and import win32api, catching the import error
And if that fails, give the user a nice polite message. This is likely to
catch 95% of the cases, and still make it obvious what the user should do in
the small percentage left...
However, it is worth noting that running "vcvars32.bat" wont work if run via
a seperate "system()" call - the environment variables set will not persist.
The only decent solution I can see is to create a temporary batch file, that
first calls "vcvars32.bat" before the builds. Depending on how distutils
does its thing, it may just be simpler to detect the condition, and politely
ask the user to run the batch file themselves...