Skip to content
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

Autocompletions for Python installs via Pyton.org Mac installer #222

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

sbaack
Copy link

@sbaack sbaack commented Apr 1, 2022

This brings the two previous commits together by adding autocompletions for Python versions installed with Python.org's Mac installer. It adds another valid option to the VIRTUALFISH_PYVERSION_COMPLETION environment variable and an extra function to provide autocompletions of Python versions installed in /Library/Frameworks/Python.framework/Versions

Note that this already includes #220 and #221 because it depends on them. This only adds the extra function in __vfsupport_setup_autocomplete and slightly adjusts the docs.

Adds autocompletions for `vf new -p` and `vf upgrade -p` to list version
numbers of Python installs from asdf or pyenv.
First, this commit adds detection of Python versions installed via
Python.org's Mac OS installers (which are installed in
/Library/Frameworks/Python.framework/Versions/). virtualfish will
prefer Python.org installations over Homebrew Python, but asdf,
pyenv, or pythonz are preferred over Python.org installs.

Second, this commit fixes an issue in how Python versions are deteced
when calling 'vf new -p' or 'vf upgrade -p'. Before this commit,
virtualfish checked if various executables are available, but didn't
continue to search if the specified Python version has not been
installed with said application. For example, if 'pyenv' is available
but the specified Python version has not been installed with pyenv,
virtualfish will directly fall back to pass to Virtualenv as-is
instead of continuing the search in, say, pythonz or Homebrew.

While it is unlikely that one would have both pyenv and pythonz
installed, continuing to search for Python versions if it hasn't been
installed in the first application found is useful with regards to detecting
Python.org installs. One might mostly use pyenv, but has issues
compiling a particular Python version with it and therefore installs
it with Python.org's Mac installer.
This brings the two previous commits together by adding autocompletions
for Python versions installed with Python.org's Mac installer. It adds
another valid option to the VIRTUALFISH_PYVERSION_COMPLETION environment
variable and provides an extra function to provide autocompletions of
Python versions installed in /Library/Frameworks/Python.framework/Versions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant