-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
VCS not found on Windows virtualenv #30
Comments
Thanks for the report. Yes, it's true that Popen doesn't work as expected with PATHEXT. A search of PATHEXT on bugs.python.org yields quite a few related issues. As I understand it (though I have no reference), Microsoft has commented on this issue and has indicated that a fix to generally support PATHEXT in the CreateProcess API (which Popen uses) is unlikely to happen, and that wrapper executables should be used for maximum compatibility. I believe there is room for the Python code to work around this limitation, and have Popen resolve the PATHEXT to the hosting executable and run the program that way, but that would be outside the scope of hgtools. Another option might be to invoke Popen with shell=True, which will use a shell process such as cmd.exe to resolve the PATHEXT script. I'm reluctant to simply make this change as I'm unaware what other implications that might have. As this project is largely defunct in deference to setuptools_scm, I suggest the issue be taken up there. If the issue is fixed there, then I'd be happy to accept the same behavior for this library. In the meantime, I'm marking this as wontfix, as I won't have time to invest in troubleshooting or testing, but I welcome pull requests. |
* Replace pep517.build with build Resolves #30 * Prefer simple usage Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
* Use `extend-ignore` in flake8 config This option allows to add extra ignored rules to the default list instead of replacing it. The default exclusions are: E121, E123, E126, E226, E24, E704, W503 and W504. Fixes #28. Refs: * https://github.com/pypa/setuptools/pull/2486/files#r541943356 * https://flake8.pycqa.org/en/latest/user/options.html#cmdoption-flake8-extend-ignore * https://flake8.pycqa.org/en/latest/user/options.html#cmdoption-flake8-ignore * Enable complexity limit. Fixes jaraco/skeleton#34. * Replace pep517.build with build (#37) * Replace pep517.build with build Resolves #30 * Prefer simple usage Co-authored-by: Jason R. Coombs <jaraco@jaraco.com> * Use license_files instead of license_file in meta (#35) Singular `license_file` is deprecated since wheel v0.32.0. Refs: * https://wheel.readthedocs.io/en/stable/news.html * https://wheel.readthedocs.io/en/stable/user_guide.html#including-license-files-in-the-generated-wheel-file Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
* Use `extend-ignore` in flake8 config This option allows to add extra ignored rules to the default list instead of replacing it. The default exclusions are: E121, E123, E126, E226, E24, E704, W503 and W504. Fixes #28. Refs: * https://github.com/pypa/setuptools/pull/2486/files#r541943356 * https://flake8.pycqa.org/en/latest/user/options.html#cmdoption-flake8-extend-ignore * https://flake8.pycqa.org/en/latest/user/options.html#cmdoption-flake8-ignore * Enable complexity limit. Fixes jaraco/skeleton#34. * Replace pep517.build with build (#37) * Replace pep517.build with build Resolves #30 * Prefer simple usage Co-authored-by: Jason R. Coombs <jaraco@jaraco.com> * Use license_files instead of license_file in meta (#35) Singular `license_file` is deprecated since wheel v0.32.0. Refs: * https://wheel.readthedocs.io/en/stable/news.html * https://wheel.readthedocs.io/en/stable/user_guide.html#including-license-files-in-the-generated-wheel-file Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
Originally reported by: Barry Laffoy (BitBucket: laffoyb, GitHub: laffoyb)
Running setuptools with a hgtools dependency in a Windows virtualenv will fail if no global
hg
executable is available on the path.To demonstrate the setup, there is no
hg
on the path:But with the virtualenv activated,
hg.bat
is available:In hgtools.managers.cmd.Mercurial, the exe is defined as "hg". This lead to
_invoke
creating commands of the formsubprocess.Popen(["hg", "status"],...)
But by opening a Python shell I can see that this won't work, whereas calls to hg.bat will work.
I'm not sure if this is a bug in hgtools, or in the underlying subprocess.Popen.
It seems like there should be a way to work around this by fiddling with the environment variable
PATHEXT
, but I can't seem to figure it out.A workaround that definitely works is to install a global Mercurial executable, by some method other that
pip install
. This will provide ahg
exe on the path. This isn't always ideal though.(edit to fix code formatting)
The text was updated successfully, but these errors were encountered: