diff -r 64e104ca555e -r a7f8160cc4e4 setup.py --- a/setup.py Tue Jan 28 22:35:08 2020 -0500 +++ b/setup.py Tue Jan 28 22:27:30 2020 -0500 @@ -323,7 +323,7 @@ # gives precedence to hg.exe in the current directory, so fall back to the # python invocation of local hg, where pythonXY.dll can always be found. check_cmd = ['log', '-r.', '-Ttest'] - if os.name != 'nt': + if os.name != 'nt' or not os.path.exists("hg.exe"): try: retcode, out, err = runcmd(hgcmd + check_cmd, hgenv) except EnvironmentError: