-
-
Notifications
You must be signed in to change notification settings - Fork 3.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
WIP: Add version aliases #2966
base: master
Are you sure you want to change the base?
WIP: Add version aliases #2966
Conversation
9962c5d
to
2700ac2
Compare
An older plugin, pyenv-alias, allowed naming the desired python version with an alias, which allowed installing multiple versions of the same python version. This is particularly useful on Apple silicon if you want to install both arm and x86_64 versions of python. Unfortunately, the pyenv-alias plugin broke when the code was updated to allow specifying multiple versions of Python to install at once, and the current code is not amenable to modifying the version in place with another plugin.
2700ac2
to
b4b8f71
Compare
I just realized that I didn't add documentation. If this functionality looks reasonable to add, I'll be sure to do so! |
I really don't like the idea of having to supply an argument via an envvar -- but can't readily recall anything better. I guess we should do a brainstorm in a discussion. Someone must have been solving the same problem before! An idea from the top of my head is an array option -- one that can be specified multiple times. |
I'm okay with either an array option, or pairing the arguments and options. I think the array option would be easier to implement. |
So it turns out that I broke non-aliased builds in this. I'll look into it. |
Got a nice-looking idea of how to couple a version and its alias: with a colon separator. A colon shouldn't normally be present in directory names (which Pyenv-managed installation names effectively are) since it's |
Make sure you have checked all steps below.
Prerequisite
Description
An older plugin, pyenv-alias, allowed naming the desired python version with an alias, which allowed installing multiple versions of the same python version. This is particularly useful on Apple silicon if you want to install both arm and x86_64 versions of python.
Unfortunately, this plugin broke when the code was modified to allow multiple versions to be specified at once on the command line, and the updated code does not allow non-invasive modification of the version number.
Tests
My PR adds the following unit tests (if any)