-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Windows virtualenv -p python2.7
fails even when python2.7.exe
exists
#1062
Comments
|
This is necessary when using conda |
It also makes cross platform scripts which call Also the suggested patch reduces complexity by leveraging a stdlib function instead of a home grown solution |
OK. I'm not sure how much I personally care about conda (I thought the idea was that if using conda you'd use conda to create environments, not virtualenv) but if that's a reason for needing it that's fine (it's not as if it's a massive patch).
It doesn't, of course, because
What home-grown solution do you mean? If you mean |
If you read the patch it should be fairly obvious what I'm referring to :) (I'm not talking about the registry bit at all) |
Oh, sorry - I did read the patch, but hadn't linked what I'd read to what you were saying - my mistake, it's been a long day :-) So yes, functionally the only difference is then that the new code will
I'm not sure if the different behaviour over the current directory is a big deal, and I doubt anyone is likely to use anything like a |
And I agree, the only extension that really should be cared about in this case is |
@pfmoore is the patch mergeable then? |
The problem stems from this function which doesn't honor the windows-specific
PATHEXT
.Here's a nearly-identical implementation of that function which does handle
PATHEXT
expansion: https://github.com/pre-commit/pre-commit/blob/e2bae300fe2794e2ece25d4cd72127238704bb1e/pre_commit/parse_shebang.py#L21-L42distutils.spawn.find_executable
has a similar special case, but only attempts.exe
: https://github.com/python/cpython/blob/9648088e6ccd6d0cc04f450f55628fd8eda3784c/Lib/distutils/spawn.py#L181-L182The text was updated successfully, but these errors were encountered: