-
-
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
fix system executable discovery #1550
Conversation
src/virtualenv/create/creator.py
Outdated
@@ -131,7 +131,7 @@ def non_write_able(dest, value): | |||
# pre 3.6 resolve is always strict, aka must exists, sidestep by using os.path operation | |||
dest = Path(os.path.realpath(raw_value)) | |||
else: | |||
dest = value.resolve() | |||
dest = value.absolute().resolve() # on Windows absolute does not imply resolve so use both |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
absolute()
is undocumented (see bpo-29688)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It works in practice though, so I'm fine with this approach for now 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ugh, reading up that thread I've swapped to os.path.abspath now 🤷♂
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also relevant is bpo-39090 - "getting the absolute path is surprisingly subtle and varied depending on your needs" 🙁
Signed-off-by: Bernat Gabor <bgabor8@bloomberg.net>
Signed-off-by: Bernat Gabor <bgabor8@bloomberg.net>
Signed-off-by: Bernat Gabor <bgabor8@bloomberg.net>
This might fix our test suite now.
Resolves #1552
Resolves #1553