diff options
| author | William Deegan <bill@baddogconsulting.com> | 2010-02-04 07:31:43 (GMT) |
|---|---|---|
| committer | William Deegan <bill@baddogconsulting.com> | 2010-02-04 07:31:43 (GMT) |
| commit | 0a300e5809c19bed53b1936ef1db2201fd0a2b71 (patch) | |
| tree | d3808de1add26d08cf28bc353d465568e34b887c /src/engine/SCons/compat | |
| parent | 689bb4560b5277797bc8aa02127362888e1a58cb (diff) | |
| download | SCons-0a300e5809c19bed53b1936ef1db2201fd0a2b71.zip SCons-0a300e5809c19bed53b1936ef1db2201fd0a2b71.tar.gz SCons-0a300e5809c19bed53b1936ef1db2201fd0a2b71.tar.bz2 | |
It should now handle picking up the SDK compilers when the VC vcvarsall.bat doesn't pick them.
Perhaps not for all flavors of the SDK, but for SDK 7.0.
Currently the following tests fail:
Failed the following 2 tests:
test\IDL\midl.py
test\Win32\scons-bat-error.py
We should add to the docs which combinations of VC and SDK we expect to work, and which have been tested.
Diffstat (limited to 'src/engine/SCons/compat')
| -rw-r--r-- | src/engine/SCons/compat/_scons_subprocess.py | 32 |
1 files changed, 17 insertions, 15 deletions
diff --git a/src/engine/SCons/compat/_scons_subprocess.py b/src/engine/SCons/compat/_scons_subprocess.py index 4968825..ccd403a 100644 --- a/src/engine/SCons/compat/_scons_subprocess.py +++ b/src/engine/SCons/compat/_scons_subprocess.py @@ -381,7 +381,21 @@ if mswindows: # can't import it. pass import msvcrt - if 0: # <-- change this to use pywin32 instead of the _subprocess driver + try: + # Try to get _subprocess + from _subprocess import * + class STARTUPINFO: + dwFlags = 0 + hStdInput = None + hStdOutput = None + hStdError = None + wShowWindow = 0 + class pywintypes: + error = IOError + except ImportError: + # If not there, then drop back to requiring pywin32 + # TODO: Should this be wrapped in try as well? To notify user to install + # pywin32 ? With URL to it? import pywintypes from win32api import GetStdHandle, STD_INPUT_HANDLE, \ STD_OUTPUT_HANDLE, STD_ERROR_HANDLE @@ -393,20 +407,8 @@ if mswindows: GetExitCodeProcess, STARTF_USESTDHANDLES, \ STARTF_USESHOWWINDOW, CREATE_NEW_CONSOLE from win32event import WaitForSingleObject, INFINITE, WAIT_OBJECT_0 - else: - # SCons: don't die on Python versions that don't have _subprocess. - try: - from _subprocess import * - except ImportError: - pass - class STARTUPINFO: - dwFlags = 0 - hStdInput = None - hStdOutput = None - hStdError = None - wShowWindow = 0 - class pywintypes: - error = IOError + + else: import select import errno |
