Hi,
I'm struggling with setting my scons environment variables for visual studio 2008.
Normally I do following:
%VS90COMNTOOLS%vsvars32.bat
or
call %VS90COMNTOOLS%vsvars32.bat
And this works in my shell.
I try to do that in python using subprocess
subprocess.call([os.environ['VS90COMNTOOLS']+r"\vsvars32.bat"])
output:
d:\N\workspace>scons test
scons: Reading SConscript files ...
Setting environment for using Microsoft Visual Studio 2008 x86 tools.
KeyError: 'INCLUDE':
above invokes batch process, but environment variables are not inherited from it to my 'master process.
When i use:
subprocess.call([os.environ['VS90COMNTOOLS']+r"\vsvars32.bat"])
I get:
d:\N\workspace>scons test
scons: Reading SConscript files ...
WindowsError: [Error 2] The system cannot find the file specified:
File "D:\N\workspace\SConstruct", line 17:
subprocess.Popen(["call ", os.environ['VS90COMNTOOLS']+r"\vsvars32.bat"])
File "C:\Python26\lib\subprocess.py", line 595:
errread, errwrite)
File "C:\Python26\lib\subprocess.py", line 821:
startupinfo)
How to achieve that?