This is a small commit to make building on Windows, at least with MSYS2 and bash, fully supported.
Git on Windows is likely to use Unix-style paths (/c/path/to/repo), whereas directories passed to Python should be Windows-style paths (C:/path/to/repo) (because Python calls into the Windows API). cygpath converts between the two.
Additionally, tempfile doesn't exist on bash on Windows, so I just force a call to mktemp, which does exist, if tempfile fails. The error message (tempfile not found) is misleading in the sense that the script does not fail, but I'm unsure of a better solution at the moment.
This is a small commit to make building on Windows, at least with MSYS2 and bash, fully supported.
Git on Windows is likely to use Unix-style paths (
/c/path/to/repo
), whereas directories passed to Python should be Windows-style paths (C:/path/to/repo
) (because Python calls into the Windows API).cygpath
converts between the two.Additionally,
tempfile
doesn't exist on bash on Windows, so I just force a call tomktemp
, which does exist, iftempfile
fails. The error message (tempfile not found
) is misleading in the sense that the script does not fail, but I'm unsure of a better solution at the moment.