Message202858
| Author |
laurent.birtz |
| Recipients |
BreamoreBoy, ThurnerRupert, eric.smith, laurent.birtz, ncoghlan, r.david.murray, terry.reedy, tim.golden |
| Date |
2013年11月14日.16:46:02 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1384447562.69.0.334287274007.issue6208@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
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. |
|