Giter VIP home page Giter VIP logo

asdf-pyapp's People

Contributors

amrox avatar matan129 avatar supersonichub1 avatar tk3fftk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

asdf-pyapp's Issues

Can I switch between ansible-base and ansible-core?

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

Installation of semgrep - error

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.

list-all ansible-base contains invalid output

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)

No versions listed after `2.10` But upstream is at `2.14`

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!

[Information] Working with aws-ssm-tools and yawsso

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

`pipx` installed via `pyapp` complains `pip` isn't found

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.

ansible-base seems not working

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

Expected executables are not available when installing Ansible

Description

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.

Steps to reproduce

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.

Expected behavior

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]

`black latest` is not working

Describe the bug

Steps to reproduce

  • Install this plugin for black
  • note that latest version of black appears to be whitespace
โฏ asdf install black latest
black  is already installed

asdf-pyapp fails when pip version string not in major.minor.patch format

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.

Ansible not compatible with its ecosystem

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

  1. Install ansible using asdf as reported in the README
  2. configure asdf and direnv in a project for using older versions of ansible (e.g. 7.6.0)
  3. In that project, try to run ansible-lint

Expected behavior
I expect ansible-lint to run without reporting the error of a broken execution environment.

Equivalent of `pipx inject` for asdf-pyapp?

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?

dbt support

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.