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

pipx: Allow injected modules to add apps #6198

Merged
merged 6 commits into from
Mar 26, 2023

Conversation

darkrain42
Copy link
Contributor

@darkrain42 darkrain42 commented Mar 16, 2023

Add support for pipx inject's --include-apps parameter.

SUMMARY

Add support to the pipx module so that state=inject can cause pipx to include applications from the specified app into $PATH.

For instance, I currently have an ansible install with ansible-lint injected, and I want ansible-lint in $PATH. I can achieve that manually, but I can't codify it (cleanly) in my ansible playbooks.

pipx install --include-deps ansible
pipx inject ansible --include-apps ansible-lint[yamllint]
ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME

pipx

ADDITIONAL INFORMATION

Add support for pipx inject's "--include-apps" parameter.
@ansibullbot
Copy link
Collaborator

cc @russoz
click here for bot help

@ansibullbot ansibullbot added feature This issue/PR relates to a feature request integration tests/integration language module module module_utils module_utils new_contributor Help guide this first time contributor packaging plugins plugin (any type) tests tests labels Mar 16, 2023
@ansibullbot ansibullbot added the needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR label Mar 16, 2023
@github-actions
Copy link

github-actions bot commented Mar 16, 2023

Docs Build 📝

Thank you for contribution!✨

This PR has been merged and your docs changes will be incorporated when they are next published.

@ansibullbot ansibullbot removed the needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR label Mar 16, 2023
@felixfontein felixfontein added check-before-release PR will be looked at again shortly before release and merged if possible. backport-6 labels Mar 16, 2023
Copy link
Collaborator

@felixfontein felixfontein left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution! I've added some first comments below.

changelogs/fragments/6198-pipx-inject-install-apps.yml Outdated Show resolved Hide resolved
plugins/modules/pipx.py Show resolved Hide resolved
@ansibullbot ansibullbot added the needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR label Mar 17, 2023
@darkrain42 darkrain42 closed this Mar 17, 2023
@darkrain42 darkrain42 reopened this Mar 17, 2023
@ansibullbot ansibullbot removed the needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR label Mar 18, 2023
@felixfontein
Copy link
Collaborator

Ping @russoz

Copy link
Collaborator

@russoz russoz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the long time to review. LGTM.

@ansibullbot ansibullbot added the stale_ci CI is older than 7 days, rerun before merging label Mar 26, 2023
@felixfontein felixfontein removed the check-before-release PR will be looked at again shortly before release and merged if possible. label Mar 26, 2023
@felixfontein felixfontein merged commit 6fa833f into ansible-collections:main Mar 26, 2023
@patchback
Copy link

patchback bot commented Mar 26, 2023

Backport to stable-6: 💚 backport PR created

✅ Backport PR branch: patchback/backports/stable-6/6fa833feed441a1b58585fd6ddf659aa73147558/pr-6198

Backported as #6238

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

patchback bot pushed a commit that referenced this pull request Mar 26, 2023
* pipx: Allow injected modules to add apps

Add support for pipx inject's "--include-apps" parameter.

* add changelog fragment

* fix pipx test ("install_apps", not "include_apps")

* fix pipx test -- add a second invocation for install_apps

* Update changelogs/fragments/6198-pipx-inject-install-apps.yml

Co-authored-by: Felix Fontein <[email protected]>

* Update plugins/modules/pipx.py

Co-authored-by: Felix Fontein <[email protected]>

---------

Co-authored-by: Felix Fontein <[email protected]>
(cherry picked from commit 6fa833f)
@felixfontein
Copy link
Collaborator

@darkrain42 thanks for your contribution!
@russoz thanks for reviewing this!

felixfontein pushed a commit that referenced this pull request Mar 26, 2023
…o add apps (#6238)

pipx: Allow injected modules to add apps (#6198)

* pipx: Allow injected modules to add apps

Add support for pipx inject's "--include-apps" parameter.

* add changelog fragment

* fix pipx test ("install_apps", not "include_apps")

* fix pipx test -- add a second invocation for install_apps

* Update changelogs/fragments/6198-pipx-inject-install-apps.yml

Co-authored-by: Felix Fontein <[email protected]>

* Update plugins/modules/pipx.py

Co-authored-by: Felix Fontein <[email protected]>

---------

Co-authored-by: Felix Fontein <[email protected]>
(cherry picked from commit 6fa833f)

Co-authored-by: Paul Aurich <[email protected]>
@darkrain42 darkrain42 deleted the pipx-install-apps branch March 26, 2023 14:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature This issue/PR relates to a feature request integration tests/integration language module_utils module_utils module module new_contributor Help guide this first time contributor packaging plugins plugin (any type) stale_ci CI is older than 7 days, rerun before merging tests tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants