Open kjwilcox opened 7 years ago
I'm working on using pipsi to avoid dependency conflicts in production deploys of internal python projects, so need this same functionality. The return-value thing is severly hampering attempts to use it in an ansible script.
Proposed:
pipsi install
returns:
pipsi upgrade
should return:I agree that there should be an install-or-upgrade-as-appropriate kind of
command, though if we follow pip
s example, there would be a --upgrade
flag
to pipsi install
that would do it. Alternately perhaps a --force
or
--install
flag to pipsi upgrade
would cause an install instead of failure
if the package wasn't present. Another alternative would be to introduce a
third command, perhaps something like pipsi latest <package>
.
I'm neutral on which choice to make, just trying to lay out the options in hope of getting something done.
i like the proposal
Just run into the same issue. Any updates on this proposal?
pipsi is effectively abandoned. For a project that is actively maintained and picks up where pipsi left off, check out https://github.com/pipxproject/pipx-app.
I am using pipsi via an ansible script to install several packages. Because I don't necessarily know ahead of time what version (if any) of the packages are already there, I am running into issues with error detection and error handling.
pipsi install
will exit with a 1 status code if there is an installation error or the package is already installed. I can't figure out a good way to distinguish these automatically (trying to scrape stderr/stdout seems really fragile).pipsi upgrade
will exit with a 1 status code if the package is not installed, or if it is already up-to-date.In 99% of cases, I just don't care what the current state of the world is and want to end up with the latest version of the package installed.
I'd really like to be able to run a single pipsi command and have it:
That might look like
pipsi install mypackage --upgrade
. Another option might be to change exit statuses (although that seems like a breaking change).I'd be happy to submit a pull request for this if it's something you'd like to see added to pipsi.