amrox / asdf-pyapp Goto Github PK
View Code? Open in Web Editor NEWA generic Python Application plugin the asdf version manager.
License: MIT License
A generic Python Application plugin the asdf version manager.
License: MIT License
Is your feature request related to a problem? Please describe.
Can I switch between ansible-base and ansible-core?
I use both ansible 2.10.x and 2.11.x or higher.
I installed ansible-core and ansible-base, asdf uses the first installed.
When switching between ansible-base and ansible-core, one of them had to be removed
Describe the solution you'd like
Switch between ansible-base and ansible-core without remove the ansible-core or ansible-base.
Describe alternatives you've considered
Nothing.
Additional context
The script messages when I installed both.
okamoto_shinichi[~] asdf list 2>&1 | grep -A 1 ansible
ansible-core
2.12.4
okamoto_shinichi[~] ansible --version
ansible [core 2.12.4]
config file = None
configured module search path = ['/Users/okamoto_shinichi/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /Users/okamoto_shinichi/.asdf/installs/ansible-core/2.12.4/venv/lib/python3.10/site-package
ansible collection location = /Users/okamoto_shinichi/.ansible/collections:/usr/share/ansible/collections
executable location = /Users/okamoto_shinichi/.asdf/installs/ansible-core/2.12.4/bin/ansible
python version = 3.10.1 (main, Dec 23 2021, 17:57:48) [Clang 13.0.0 (clang-1300.0.27.3)]
jinja version = 3.1.1
libyaml = True
okamoto_shinichi[~] asdf plugin add ansible-base https://github.com/amrox/asdf-pyapp.git
okamoto_shinichi[~] asdf install ansible-base 2.10.17
okamoto_shinichi[~] asdf global ansible-base 2.10.17
okamoto_shinichi[~] asdf list 2>&1 | grep -A 1 ansible
ansible-base
2.10.17
ansible-core
2.12.4
okamoto_shinichi[~] asdf reshim
okamoto_shinichi[~] ansible --version
ansible [core 2.12.4]
config file = None
configured module search path = ['/Users/okamoto_shinichi/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /Users/okamoto_shinichi/.asdf/installs/ansible-core/2.12.4/venv/lib/python3.10/site-package
ansible collection location = /Users/okamoto_shinichi/.ansible/collections:/usr/share/ansible/collections
executable location = /Users/okamoto_shinichi/.asdf/installs/ansible-core/2.12.4/bin/ansible
python version = 3.10.1 (main, Dec 23 2021, 17:57:48) [Clang 13.0.0 (clang-1300.0.27.3)]
jinja version = 3.1.1
libyaml = True
Is your feature request related to a problem? Please describe.
I stumbled onto this because I was trying to build an asdf-semgrep but couldn't figure out why it was crashing. It seems this repository does a lot of heavy lifting for python applications and it's very much appreciated.
I ran into an error when running asdf plugin add semgrep https://github.com/amrox/asdf-pyapp.git
and then asdf latest semgrep
. Semgrep can be found in Pypi.
When running asdf latest semgrep
or asdf list-all semgrep
. This is the error:
Plugin semgrep's list-all callback script failed with output:
asdf-pyapp: [ERROR] Unable to parse versions for 'semgrep'
I'm running Python 3.11.8 and pip 24.0.
Describe the solution you'd like
semgrep to be installed and running
Describe alternatives you've considered
I'll probably look into the parser to see how versions are being parsed.
Describe the bug
Running asdf list-all ansible-base
returns version numbers surrounded by invalid output.
The output I got was
โ asdf list-all ansible-base
-atplotlib
-atplotlib
(/home/me/.local/lib/python3.9/site-packages)
(/home/me/.local/lib/python3.9/site-packages
0.0.1a1
0.0.1a2
2.10.0
2.10.0b1
2.10.0rc1
2.10.0rc2
2.10.0rc3
2.10.0rc4
2.10.1
2.10.1rc1
2.10.1rc2
2.10.1rc3
2.10.2
2.10.2rc1
2.10.3
2.10.3rc1
2.10.4
2.10.4rc1
2.10.5
2.10.5rc1
2.10.6
2.10.6rc1
2.10.7
2.10.7rc1
2.10.8
2.10.8rc1
2.10.9
2.10.9rc1
2.10.10
2.10.10rc1
2.10.11
2.10.11rc1
2.10.12
2.10.12rc1
2.10.13
2.10.13rc1
2.10.14
2.10.14rc1
2.10.15
2.10.15rc1
2.10.16)
2.10.16rc1
ERROR:
Ignoring
Ignoring
No
WARNING:
WARNING:
ansible-base==
distribution
distribution
distribution
for
found
invalid
invalid
matching
Steps to reproduce
asdf plugin add ansible-base https://github.com/amrox/asdf-pyapp.git
asdf list-all ansible-base
Expected behavior
I expected to get a valid list of installable ansible versions.
Edit
asdf install ansible-base latest
is also broken as it tries to install ansible-base==2.10.16)
Describe the bug
Listing latest releases with the plugin ends at 2.10.17, but the latest release (found in pip) is 2.14.4 (as of this writing)
Steps to reproduce
asdf add plugin ansible-base
asdf list all ansible-base
Expected behavior
Latest should keep track with pip releases (to my understanding)
Screenshots
asdf list all ansible-base
0.0.1a1
0.0.1a2
2.10.0
2.10.0b1
2.10.0rc1
2.10.0rc2
2.10.0rc3
2.10.0rc4
2.10.1
2.10.1rc1
2.10.1rc2
2.10.1rc3
2.10.2
2.10.2rc1
2.10.3
2.10.3rc1
2.10.4
2.10.4rc1
2.10.5
2.10.5rc1
2.10.6
2.10.6rc1
2.10.7
2.10.7rc1
2.10.8
2.10.8rc1
2.10.9
2.10.9rc1
2.10.10
2.10.10rc1
2.10.11
2.10.11rc1
2.10.12
2.10.12rc1
2.10.13
2.10.13rc1
2.10.14
2.10.14rc1
2.10.15
2.10.15rc1
2.10.16
2.10.16rc1
2.10.17
2.10.17rc1
Additional context
Just a thanks ๐ง for making this!
Is your feature request related to a problem? Please describe.
Not really a problem.
Your plugin works like charm with two other packages:
Describe the solution you'd like
Probably nothing ;-)
Except maybe these tools are listed in README.md (but I know this list is non-exhaustive).
Or add them in asdf-plugins (I did not look exactly how it happens).
Probably I can make a PR for this two suggestions, let me know!
edit: typo in link
Describe the bug
pipx
complains no pip
is available when installing poetry
, or any other apps.
Steps to reproduce
$ asdf install pipx latest
Requirement already satisfied: setuptools in ./.asdf/installs/pipx/1.2.0/venv/lib/python3.11/site-packages (65.5.0)
Collecting setuptools
Using cached setuptools-67.7.2-py3-none-any.whl (1.1 MB)
Installing collected packages: setuptools
Attempting uninstall: setuptools
Found existing installation: setuptools 65.5.0
Uninstalling setuptools-65.5.0:
Successfully uninstalled setuptools-65.5.0
Successfully installed setuptools-67.7.2
Requirement already satisfied: pip in ./.asdf/installs/pipx/1.2.0/venv/lib/python3.11/site-packages (22.3.1)
Collecting pip
Using cached pip-23.1.2-py3-none-any.whl (2.1 MB)
Collecting wheel
Using cached wheel-0.40.0-py3-none-any.whl (64 kB)
Installing collected packages: wheel, pip
Attempting uninstall: pip
Found existing installation: pip 22.3.1
Uninstalling pip-22.3.1:
Successfully uninstalled pip-22.3.1
Successfully installed pip-23.1.2 wheel-0.40.0
Collecting pipx==1.2.0
Using cached pipx-1.2.0-py3-none-any.whl (57 kB)
Collecting argcomplete>=1.9.4 (from pipx==1.2.0)
Downloading argcomplete-3.0.8-py3-none-any.whl (40 kB)
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ 40.0/40.0 kB 1.7 MB/s eta 0:00:00
Collecting packaging>=20.0 (from pipx==1.2.0)
Using cached packaging-23.1-py3-none-any.whl (48 kB)
Collecting userpath>=1.6.0 (from pipx==1.2.0)
Using cached userpath-1.8.0-py3-none-any.whl (9.0 kB)
Collecting click (from userpath>=1.6.0->pipx==1.2.0)
Using cached click-8.1.3-py3-none-any.whl (96 kB)
Installing collected packages: packaging, click, argcomplete, userpath, pipx
Successfully installed argcomplete-3.0.8 click-8.1.3 packaging-23.1 pipx-1.2.0 userpath-1.8.0
Collecting pipx==0.16.5
Downloading pipx-0.16.5-py3-none-any.whl (54 kB)
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ 54.2/54.2 kB 2.8 MB/s eta 0:00:00
Collecting userpath>=1.6.0
Using cached userpath-1.8.0-py3-none-any.whl (9.0 kB)
Collecting argcomplete<2.0,>=1.9.4
Downloading argcomplete-1.12.3-py2.py3-none-any.whl (38 kB)
Collecting packaging>=20.0
Using cached packaging-23.1-py3-none-any.whl (48 kB)
Collecting click
Using cached click-8.1.3-py3-none-any.whl (96 kB)
Installing collected packages: argcomplete, packaging, click, userpath, pipx
Successfully installed argcomplete-1.12.3 click-8.1.3 packaging-23.1 pipx-0.16.5 userpath-1.8.0
$ pipx --version
1.2.0
$ pip --version
pip 23.1.2 from /home/us-er/.asdf/installs/python/3.11.3/lib/python3.11/site-packages/pip (python 3.11)
$ pipx install poetry
Fatal error from pip prevented installation. Full pip output in file:
/home/us-er/.local/pipx/logs/cmd_2023-05-04_15.15.45_pip_errors.log
Error installing poetry
$ cat /home/us-er/.local/pipx/logs/cmd_2023-05-04_15.15.45_pip_errors.log
PIP STDOUT
----------
PIP STDERR
----------
/home/us-er/.local/pipx/venvs/poetry/bin/python: No module named pip
Expected behavior
pipx
works properly.
I'm aware that I can use
pyapp
directly, but I've reasons not to.
Describe the bug
Lint jobs fail with the error:
/home/runner/.asdf/plugins/nodejs/bin/import-release-team-keyring: No such file or directory
I don't understand this, it came from the asdf-plugin-template
Steps to reproduce
Run CI Lint
Describe the bug
ansible-base seems not working
Steps to reproduce
โฏ asdf plugin add ansible-base https://github.com/amrox/asdf-pyapp.git
โฏ asdf current
ansible-base ______ No version is set. Run "asdf <global|shell|local> ansible-base "
awscli 2.4.0 /root/.tool-versions
packer 1.7.8 /root/.tool-versions
terraform 1.0.11 /root/.tool-versions
โฏ asdf list all ansible-base
Plugin ansible-base's list-all callback script failed with output:
โฏ asdf install ansible-base latest
Plugin ansible-base's list-all callback script failed with output:
ansible-base is already installed
When installing ansible through this plugin, only the executable ansible-community
is available, all other ansible executables are missing.
Sorry if I am misunderstanding or doing something wrong, but the result I am getting is neither expected nor useful.
ASDF_PYAPP_INCLUDE_DEPS=1 asdf plugin add ansible https://github.com/amrox/asdf-pyapp.git
ASDF_PYAPP_INCLUDE_DEPS=1 asdf install ansible 8.4.0
asdf local ansible 8.4.0
ansible-playbook --version
zsh: command not found: ansible-playbook
I have tried with and without ASDF_PYAPP_INCLUDE_DEPS=1
, and it's the same result in both cases.
I have tried using both asdf and rtx, and it's the same result in both cases.
I have tried both version 8.3.0 and 8.4.0, and it's the same result in both cases.
All regular ansible executables should be available, for example: ansible
, ansible-playbook
, ansible-galaxy
, ansible-vault
.
That is what happens when installing ansible through pip.
python -m venv venv
. ./venv/bin/activate
pip install ansible==8.4.0
ansible-playbook --version
ansible-playbook [core 2.15.4]
Describe the bug
Steps to reproduce
black
latest
version of black
appears to be whitespaceโฏ asdf install black latest
black is already installed
Describe the bug
asdf-pyapp fails to install an app with pip version 21.0
Steps to reproduce
$ python3 -m pip --version
pip 21.0 from /usr/lib/python3.10/site-packages/pip (python 3.10)
$ asdf install yamllint
asdf-pyapp: [ERROR] Unable to parse pip version
With shell trace:
++ local 'regex=pip (.+) from.*\(python (.+)\)'
++ [[ pip 21.0 from /usr/lib/python3.10/site-packages/pip (python 3.10) =~ pip (.+) from.*\(python (.+)\) ]]
++ echo -n 21.0
+ pip_version=21.0
+ [[ 21.0 =~ ^([0-9]+)\.([0-9]+)\. ]]
+ fail 'Unable to parse pip version'
+ echo -e 'asdf-pyapp: [ERROR] Unable to parse pip version'
asdf-pyapp: [ERROR] Unable to parse pip version
Expected behavior
asdf-pyapp working with PIP version specified in major.minor format.
Describe the bug
When using ansible from asdf, ansible-lint won't work due to the following error:
โฏ ansible-lint playbook.yml
Ansible CLI (2.14.6) and python module (2.15.2) versions do not match. This indicates a broken execution environment.
Steps to reproduce
7.6.0
)Expected behavior
I expect ansible-lint to run without reporting the error of a broken execution environment.
Pipx supports the very useful "inject" feature, which allows you to easily pip install
additional packages into the environment of a particular Python application, e.g.:
pipx install jupyterlab
pipx inject jupyterlab ipywidgets ipympl
Is this supported at all in the ASDF-PyApp plugin? If not, can it be? Is it even possible to support this, within the ASDF framework?
Is your feature request related to a problem? Please describe.
The linking doesn't seem to work with DBT, and as dbt isn't in the list of Compatible Python Applications
I'm assuming it's not "officially" supported, and thus a feature and not a bug.
Describe the solution you'd like
the dbt command available as a shim
asdf plugin add dbt-snowflake https://github.com/amrox/asdf-pyapp.git
ls ~/.asdf/installs/dbt-snowflake/1.0.0rc1/venv/bin
lists dbt as a binary there
ls ~/.asdf/installs/dbt-snowflake/1.0.0rc1/bin
but is not linked here, thus no shim
perhaps because the egg/wheel is named dbt-snowflake
and not just dbt
? (not sure haven't verified in the code as of yet, and not sure if this is something you would want to officially support)
Describe alternatives you've considered
I could set up another asdf plugin exclusively for dbt.
Additional context
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.