-
Notifications
You must be signed in to change notification settings - Fork 433
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
pip freeze
-like option for pipx list
#224
Conversation
Each subparser is added in its own function
If `--freeze` is supplied, print package information in a format compatible with requirements files, like `pip freeze`. Note that all pipx packages are listed, regardless of their associated python version. Like `pip freeze`, development packages and those installed from non-pypi sources will simply have their name and version listed.
Hmm, I'm leaning away from this implementation due to the lack of injection handling. It may be better to focus on a serialisation format like that used in the pipxrc. |
Thanks for doing this! I am also thinking a pipxrc will supplant the need for this. I'll wait to close this out until pipxrc in merged though. I like the way you updated the way argument parsers are added. If you want to split that into its own PR I will merge it. |
Done, see #239 |
Are there intensions to revive the |
Metadata is now saved in the respective virtual environments, but it's not accessible by the user, only behind the scenes by pipx. There are no plans to revive it. What are you trying to accomplish with it? |
I'm having the same scenario as described in #109 which links to this PR. |
I want to be able to re-install any apps managed by pipx on a vanilla system. Should I backup the metadata files in the venvs for this purpose? |
Yes that should come close. But there is no easy way to recreate the venvs and move the metadata files back into them though, so that will have to be done manually. Also, absolute paths are stored in the metadata files so they may not translate well to different machines. Other than that it should work fine. |
Is this one of the reasons to not have a |
Yeah it definitely seems like a useful feature that I'd be open to. I think the way to do it is first update the metadata format to not record the full path, but rather record relative paths. Then join them with the venv dir or bin dir, at runtime as necessary. After the metadata change is made, it will be pretty straightforward to add the freeze command. @pylipp i f you want to give it a shot that would be awesome. cc @itsayellow if you have any thoughts or have already started working on this. |
We should probably move this conversation back to #109. |
The first half of #109 and #156 .
Adds a
--freeze
option topipx list
, which prints information in the same format aspip freeze
/requirements.txt
. Unlikepip freeze
, it does not capture all the packages' dependencies (because that wouldn't make any sense here). Likepip freeze
, it only stores the package name and version, not capturing python/ platform restrictions, non-PyPI sources etc. This could possibly be addressed in a post- #222 world.Nor does it deal with injected packages.
Next would be adding a
--requirement
option topipx install
, which will parse a requirements file and runcommands.install
for each. At that point I would also be inclined to add other ways to install multiple packages at once (e.g.pip install package1 package2 package3
,pip install package1 packge2 --spec spec1 --spec spec2
).P.S. Fantastic project and a great codebase to work in!