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 to install packages according to spec metadata file #1301

Merged
merged 11 commits into from
Apr 3, 2024

Conversation

huxuan
Copy link
Contributor

@huxuan huxuan commented Mar 26, 2024

  • I have added a news fragment under changelog.d/ (if the patch affects the end users)

Summary of changes

Fix #687

Test plan

Tested by running

pipx list --json > pipx.json
pipx install-all pipx.json

Known issues

  1. pipx install --force without --python complains about the ignorance of --python #1304
  2. Can not move utility functions to pipx.util due to circular import problem. Add "install-all" command to install packages according to spec metadata file #1301 (comment)

@huxuan huxuan changed the title Add "install-all" command to install packages according to spec metad… Add "install-all" command to install packages according to spec metadata file Mar 26, 2024
Copy link
Contributor

@chrysle chrysle left a comment

Choose a reason for hiding this comment

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

Thank you for this piece of work, it will come in handy! Could we have an example in docs/examples.md?

src/pipx/main.py Outdated Show resolved Hide resolved
changelog.d/687.feature.md Outdated Show resolved Hide resolved
src/pipx/commands/install.py Outdated Show resolved Hide resolved
src/pipx/commands/install.py Outdated Show resolved Hide resolved
src/pipx/commands/install.py Outdated Show resolved Hide resolved
src/pipx/commands/install.py Show resolved Hide resolved
@chrysle
Copy link
Contributor

chrysle commented Mar 26, 2024

Could you move the two helper functions to util.py? We're trying to keep the command files as clear as possible.

@huxuan
Copy link
Contributor Author

huxuan commented Mar 26, 2024

Could you move the two helper functions to util.py? We're trying to keep the command files as clear as possible.

After moving the two utils to pipx.util. from pipx.pipx_metadata_file import PackageInfo, PipxMetadata, _json_decoder_object_hook will import PipxError before it is initialized which will lead to "circular import" problem. Any ideas?

Maybe we need a pipx.model for those entities? If so, I would suggest to do it in a separate pull request.

@huxuan huxuan marked this pull request as draft March 26, 2024 14:27
@huxuan
Copy link
Contributor Author

huxuan commented Mar 26, 2024

I find some bug for the python args, will request another review when fix that problem.

@huxuan huxuan requested a review from chrysle March 27, 2024 03:59
@huxuan huxuan marked this pull request as ready for review March 27, 2024 03:59
@huxuan
Copy link
Contributor Author

huxuan commented Mar 27, 2024

@chrysle All comments except for moving the utility functions should be done. PTAL :-)

huxuan and others added 10 commits April 2, 2024 06:54
Co-authored-by: chrysle <fritzihab@posteo.de>
Co-authored-by: chrysle <fritzihab@posteo.de>
Co-authored-by: chrysle <fritzihab@posteo.de>
Co-authored-by: chrysle <fritzihab@posteo.de>
Co-authored-by: chrysle <fritzihab@posteo.de>
@chrysle chrysle enabled auto-merge (squash) April 3, 2024 16:41
@chrysle
Copy link
Contributor

chrysle commented Apr 3, 2024

Maybe we need a pipx.model for those entities? If so, I would suggest to do it in a separate pull request.

Sounds good, let's keep it like this for now.

@chrysle chrysle merged commit dddf074 into pypa:main Apr 3, 2024
14 checks passed
@huxuan huxuan deleted the xuan.hu/install-all branch April 3, 2024 23:57
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.
2 participants