Repository navigation
pipx upgrade from wheel file #1345
Replies: 2 comments 3 replies
|
I manage to perform the I guess a simple update of the documentation could help a lot in this direction, in the case the above process is actually valid. |
|
pipx stores the original spec and re-runs pip against it. With a wheel, that spec has the version baked into the filename: $ pipx install ./mitool-1.0.0-py3-none-any.whl
$ pipx list --json | jq -r '.venvs.mitool.metadata.main_package.package_or_url'
/tmp/wh/mitool-1.0.0-py3-none-any.whlSo $ pipx upgrade mitool # mitool-1.1.0-py3-none-any.whl exists in the same directory
upgrading mitool from spec '/tmp/wh/mitool-1.0.0-py3-none-any.whl'...
mitool is already at latest version 1.0.0Nothing is broken — the spec is just pinned by construction. Point it at the source directory instead and upgrades work the way you want: $ pipx install ./src # stores package_or_url: /tmp/wh/src
$ # ... bump the version in pyproject.toml, edit the code ...
$ pipx upgrade mitool
upgrading mitool from spec '/tmp/wh/src'...
upgraded package mitool from 1.2.0 to 1.3.0The stored spec has no version in it, so each If you would rather keep shipping wheels, $ pipx install --force ./mitool-1.1.0-py3-none-any.whl
$ mitool
mitool 1.1.0A third option, if you want All four transcripts above are from an actual run against a throwaway |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
I have a few personal utilities that are a bit too small and specific to push to pypi
I install these with
pipxfrom local wheel files and it works very well.As far as I can tell, it is not possible to
pipx upgradefrom a wheel file.It isn't a big deal to
pipx uninstalland then reinstall again from a later wheel file, but I wondered if you had ever considered allowingpipx upgradefrom a wheel file?I find
pipxto be an awesome package and very much appreciate your hard work.Thanks kindly
All reactions