This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

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.
History
Date User Action Args
2013-11-14 16:46:02laurent.birtzsetrecipients: + laurent.birtz, terry.reedy, ncoghlan, eric.smith, tim.golden, ThurnerRupert, r.david.murray, BreamoreBoy
2013-11-14 16:46:02laurent.birtzsetmessageid: <1384447562.69.0.334287274007.issue6208@psf.upfronthosting.co.za>
2013-11-14 16:46:02laurent.birtzlinkissue6208 messages
2013-11-14 16:46:02laurent.birtzcreate