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

Add install-all command #874

Closed
wants to merge 8 commits into from
Closed

Add install-all command #874

wants to merge 8 commits into from

Conversation

dukecat0
Copy link
Member

  • I have added an entry to docs/changelog.md

Summary of changes

Closes #687

Test plan

Tested by running

pipx install-all packages.json

@A1vinSmith
Copy link

Thank you for this. Although, most of repos that I want to run it doesn't have the packages.json.
I want to run pipx install-all requirements.txt

@uranusjr
Copy link
Member

uranusjr commented Aug 2, 2022

Even on where the manifest does exist, it’s still tedious for most users to have to dig out the file manually. It’s probably better for us to add something like pipx freeze (or export? something else?) to couple with this.

@A1vinSmith
Copy link

Even on where the manifest does exist, it’s still tedious for most users to have to dig out the file manually. It’s probably better for us to add something like pipx freeze (or export? something else?) to couple with this.

That sounds nice. Maybe even pipx install-all-rtxt that includes two commands above.

@dukecat0
Copy link
Member Author

dukecat0 commented Aug 2, 2022

pipx install-all packages.json

This packages.json is the output of pipx list --json, and it's a little bit different from requirements.txt, but I am +1 on supporting requirements.txt.

@uranusjr
Copy link
Member

uranusjr commented Aug 2, 2022

Supporting requirements.txt would probably be unnecessarily complicated since the format lacks a lot of structure we need to for metadata besides just packages. I’d stick with just supporting our own JSON manifest.

@dukecat0
Copy link
Member Author

dukecat0 commented Aug 2, 2022

It’s probably better for us to add something like pipx freeze (or export? something else?) to couple with this.

I guess the output of pipx freeze would be quite similar to the output of pipx list --json, while pipx freeze doesn't have to contain info that wouldn't be used by pipx install-all.

@uranusjr
Copy link
Member

uranusjr commented Aug 6, 2022

Yeah, and also it can have options like --output to make it easier to forward things to a file without shell syntax.

@xeor
Copy link

xeor commented Aug 18, 2022

This is exactly what I'm looking for! :)

Should python-version be read from the dump-file? Is it better to not include that and let the install command figure it out itself? What if the version doesnt exist on the system?

@dukecat0
Copy link
Member Author

Should python-version be read from the dump-file?

Some packages have limitations on the Python version, so python-version has to be read from the file.

What if the version doesnt exist on the system?

They will get an error and then they can install the package manually with pipx install <packages>

@halostatue
Copy link

This would solve most of what I would want in #952, but would it also automatically inject packages?

   package mkdocs 1.4.2, installed using Python 3.11.3
    - mkdocs
    Injected Packages:
      - mkdocs-material 9.1.8
      - mkdocs-mermaid2-plugin 0.6.0
      - mkdocs-redirects 1.2.0
      - mkdocs-simple-hooks 0.1.5

From my perspective as well, it would be useful to have missing Python version values assume the use of the (default) version, as most of the packages I install are simply done with pipx install <package> and haven’t yet found one that requires a specific Python (which is good, because I don’t actually plan on having multiple versions installed; I don’t develop software in Python, but I happily use many of the amazing tools).

@dukecat0
Copy link
Member Author

dukecat0 commented May 5, 2023

but would it also automatically inject packages?

Currently no, but I will implement it in the future.

Copy link
Contributor

@gaborbernat gaborbernat left a comment

Choose a reason for hiding this comment

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

Merge conflicts 👍

@gaborbernat
Copy link
Contributor

Seems stalled, we can reopen if you pick it up again.

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.

Support provisioning of pipx-managed sites from the output of pipx list --json.
6 participants