Message202858
Thank you for the clarifications on the usage of cmd.exe and shell=True. I tend to forget that the shell support in subprocess isn't just about UNIX.
The point of running msys is getting programs to work as if they were in a limited UNIX environment without the emulation layer provided by Cygwin. It's nice if programs unaware of msys work out-of-the-box, but for use cases like mine what is needed is the possibility to write a program that works correctly on msys with a minimum of fuss.
Given that, conditionally setting os.dep on program entry and wrapping the calls to cmd.exe manually seems to fit the bill. I haven't tested if SCons plays nice with that change, so I may be in for a disappointment. Even if it doesn't work right, it would still be useful for me to temporarily change os.dep and join my paths correctly until I return control to SCons.
On my system, print os.environ["MSYSTEM"] yields MINGW32. That's all I need for detecting msys currently. If that ever break I'll find another method. |
|
Date |
User |
Action |
Args |
2013-11-14 16:46:02 | laurent.birtz | set | recipients:
+ laurent.birtz, terry.reedy, ncoghlan, eric.smith, tim.golden, ThurnerRupert, r.david.murray, BreamoreBoy |
2013-11-14 16:46:02 | laurent.birtz | set | messageid: <1384447562.69.0.334287274007.issue6208@psf.upfronthosting.co.za> |
2013-11-14 16:46:02 | laurent.birtz | link | issue6208 messages |
2013-11-14 16:46:02 | laurent.birtz | create | |
|