-
-
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
Also add executables for pythonX.X under pypy #1615
Conversation
marking as draft as I think this is blocked by #1614 |
ah neat, the remaining failures will be fixed by https://bitbucket.org/pypy/pypy/pull-requests/697/also-create-python3x-symlink-in/diff -- I'll add a little skip for that |
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.
LGTM.
macos py35 failure appears to be a flake -- I think this is ready to go |
exes = ("python", "python{}".format(*sys.version_info), "python{}.{}".format(*sys.version_info)) | ||
# pypy3<=7.3: https://bitbucket.org/pypy/pypy/pull-requests/697 | ||
if IS_PYPY and CURRENT.pypy_version_info[:3] <= [7, 3, 0] and creator == "venv": | ||
exes = exes[:-1] |
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.
I am not sure this is correct. On CPython, the actual exe (what is at the base of all the symlinks) is python/path/python3.6
, on PyPy it is pypy/path/pypy3
. Then venv copies that base exe and creates aliases for newpath/bin/python and newpath/bin/python3. So the test should be something like
if IS_PYPY:
exename = f'pypy{sys.version_info.major}'
else:
exename = f'python{sys.version_info.major}.{sys.version_info.minor}'
exes = ("python", f'pypy{sys.version_info.major}', exename)
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.
@mattip the fact that the base is python3.6
is just a matter of luck; of under what name we discover the python. It well could be any of the python
, python3
or python3.6
depending on how we discover it on the path. How it's exposed at root level from should not affect how the virtualenv makes it available 👍
Here venv creates links for |
I consider that an implementation detail given the pep does not address it, so we might choose to offer further aliases if we want in our own implementations. |
Resolves #1612
Resolves #1614
Thanks for contributing a pull request, see checklist all is good!
docs/changelog
folder