BugFix: allow run_in_windows_bash in MSYS/Cygwin - #8506
Conversation
Signed-off-by: SSE4 <tomskside@gmail.com>
| It requires to have MSYS2, CYGWIN, or WSL | ||
| """ | ||
| env = env or {} | ||
| if platform.system() != "Windows": |
There was a problem hiding this comment.
Cygwin also returns "Windows" here, could be only Msys will be different
There was a problem hiding this comment.
didn't check Cygwin (may check tomorrow), msys returns a different value for sure
There was a problem hiding this comment.
The fix seems fine anyway, it was just an observation. Would you like to check something more, or can it be merged?
There was a problem hiding this comment.
for the completeness.
Cygwin:
sse4@DESKTOP-LAD63V0 ~
$ python -c "import platform; print(platform.system())"
CYGWIN_NT-10.0-18363
MSYS2:
sse4@DESKTOP-LAD63V0 MSYS ~
$ python -c "import platform; print(platform.system())"
MSYS_NT-10.0-18363
MinGW32 (MSYS2):
sse4@DESKTOP-LAD63V0 MINGW32 ~
$ python -c "import platform; print(platform.system())"
MINGW32_NT-10.0-18363
MinGW64 (MSYS2):
sse4@DESKTOP-LAD63V0 MINGW64 ~
$ python -c "import platform; print(platform.system())"
MINGW64_NT-10.0-18363
There was a problem hiding this comment.
Curiously, it seems it can change, I am not sure why:
Cygwin:
$ python -c "import platform; print(platform.system())"
Windows
In any case, doesn't seem relevant, if it can change in other computers, need to take it into account.
There was a problem hiding this comment.
this is probably not a python from a Cygwin itself. run which python to check.
if it's /usr/bin/python, then it's cygwin's one.
if it's something like /cygdrive/c/users..., then it's installed in the main Windows system.
|
I think this can be merged, but I would like to note that |
|
checking cygwin, it seems to be not enough: I guess the error is in which allows the build to start. |
|
@SSE4 How would you like to proceed? Fixing those things in this PR? |
nope, this deserves its own PR, and I want to write some tests for |
related to #8476
running
AutoToolsBuildEnvironment(self, win_bash=True)in MSYS2 results in an error:the fix allows
run_in_windows_bashto work in sub-systems as well.Changelog: BugFix: Allow
run_in_windows_bashin MSYS/Cygwin.Docs: omit
developbranch, documenting this one.Note: By default this PR will skip the slower tests and will use a limited set of python versions. Check here how to increase the testing level by writing some tags in the current PR body text.