asdf-python
asdf-python copied to clipboard
With `path:` version, `python` shim fails (but `python3` works) (asdf v0.13)
Provide environment information
OS:
Linux ad-user-ads-11.s.xx.xxx 3.10.0-1160.90.1.el7.x86_64 #1 SMP Thu May 4 15:21:22 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
SHELL:
GNU bash, version 5.2.37(1)-release (x86_64-pc-linux-gnu)
Copyright (C) 2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
BASH VERSION:
5.2.37(1)-release
ASDF VERSION:
v0.13.1-0586b37
ASDF INTERNAL VARIABLES:
ASDF_DEFAULT_TOOL_VERSIONS_FILENAME=.tool-versions
ASDF_DATA_DIR=/usr/lusers/jacktose/.asdf
ASDF_DIR=/usr/lusers/jacktose/.asdf
ASDF_CONFIG_FILE=/usr/lusers/jacktose/.asdfrc
ASDF INSTALLED PLUGINS:
python https://github.com/danhper/asdf-python.git master 5e277e2
To Reproduce
- Have a non-asdf python installation:
$ /netops/local/python-3.9.2/bin/python3.9 -V Python 3.9.2 - Configure asdf to use it, with
path:syntax:$ asdf local python path:/netops/local/python-3.9.2 $ cat .tool-versions python path:/netops/local/python-3.9.2 - Check which
pythonis used:$ asdf which python /usr/local/bin/python $ python -V Python 2.7.5 - Compare to
python3:$ asdf which python3 /netops/local/python-3.9.2/bin/python3 $ python3 -V Python 3.9.2
Note that shims are fine:
$ which python
~/.asdf/shims/python
$ which python3
~/.asdf/shims/python3
And python works as expected for asdf-installed python:
$ asdf local python 3.9.15
$ cat .tool-versions
python 3.9.15
$ asdf which python
/usr/lusers/jacktose/.asdf/installs/python/3.9.15/bin/python
$ python -V
Python 3.9.15
$ asdf which python3
/usr/lusers/jacktose/.asdf/installs/python/3.9.15/bin/python3
$ python3 -V
Python 3.9.15
Describe the Bug
When setting the python version to a non-asdf python3 with a path: entry, the python shim calls the system python instead of the configured one. The python3 shim calls the configured one as expected.
Expected Behaviour
The python shim should call the configured python binary, as the python3 shim does.
This is for asdf <0.16. I opened #207 for the similar problem in asdf 0.16. If this plugin is no longer supporting asdf <0.16, this issue can be closed.