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

feat(pypi): attempt more python3 candidates #1608

Merged
merged 1 commit into from
Jan 25, 2024

Conversation

williamboman
Copy link
Owner

No description provided.

@chrisgrieser
Copy link

Okay, so I just gave this a try, and it looks like it's not working for me?
To test, I installed pylint, and it still uses the system python on 3.9.

> which -a python3.12
/opt/homebrew/bin/python3.12
> which -a python3
/usr/bin/python3
> which -a python3.9
python3.9 not found
> which -a python
python not found
> test -e /Library/Developer/CommandLineTools/usr/bin/python3.9 && echo "exists"
exists
> echo $PATH /opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Library/Apple/usr/bin:/Users/chrisgrieser/.local/share/nvim/mason/bin

Content of the pyvenv.cfg of the pylint package installed by mason:

home = /Library/Developer/CommandLineTools/usr/bin
include-system-site-packages = false
version = 3.9.6

For some reason, it appears mason is using the python3.9 installed by the macOS command line utilities (installed via xcode-select --install, required for homebrew to work), even though the folder is not in my PATH.

Just in case, I ran :lua= vim.env.PATH inside nvim, which gives this result:

/Users/chrisgrieser/.local/share/nvim/mason/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Library/Apple/usr/bin:/Users/chrisgrieser/.local/share/nvim/mason/bin:/opt/homebrew/bin

And :! which -a python 3.9 gives this:

:!which -a python3.9
python3.9 not found
shell returned 1

@chrisgrieser
Copy link

ugh, nevermind, I simply had a typo, I copied eat/more-python-candidates instead of feat/more-python-candidates. Without the typo, everything works correctly. 🤦‍♂️

@williamboman williamboman merged commit dcd0ea3 into main Jan 25, 2024
14 checks passed
@williamboman williamboman deleted the feat/more-python-candidates branch January 25, 2024 21:02
williamboman added a commit to BlueDrink9/mason.nvim that referenced this pull request Mar 21, 2024
* origin/main:
  tests: remove old spec (williamboman#1634)
  chore(main): release 1.10.0 (williamboman#1605)
  fix(pypi): fix variable shadowing (williamboman#1610)
  feat(pypi): attempt more python3 candidates (williamboman#1608)
  fix(golang): fix fetching package versions for packages containing subpath specifier (williamboman#1607)
  feat: don't use vim.g.python3_host_prog as a candidate for python (williamboman#1606)
  fix(ui): don't indent empty lines (williamboman#1597)
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.

2 participants