Only install pre-release rc versions and ignore other(including development and stable) versions when with option --rc
See original GitHub issueWhat’s the problem this feature will solve?
Sometimes, we want to only install rc
versions on our release branch. We want to use somepackage>=1.1.2rc1
and expect it to install the latest rc
version 1.2.3rc1
, though we have 1.1.2rc1, 1.2.0rc1, 1.2.0, 1.2.1a1, 1.2.1, 1.2.2a1, 1.2.2, 1.2.3a1, 1.2.3rc1, 1.2.3
. Our versions all follow the specification on semver.org .
Describe the solution you’d like
Add an option --rc
to make pip only consider rc
version and ignore stable as well as development versions.
Alternative Solutions
Not found yet.
Additional context
From the semver.org, the precedence is something like the following example. Example: 1.0.0-alpha < 1.0.0-alpha.1 < 1.0.0-alpha.beta < 1.0.0-beta < 1.0.0-beta.2 < 1.0.0-beta.11 < 1.0.0-rc.1 < 1.0.0.
On my release and development branch, I tried to use pip install --pre somepackage>=1.1.2rc1
but it installed the latest stable version 1.2.3
for me. What I want is 1.2.3rc1
.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:5 (2 by maintainers)
I guess you can explicitly specify the version you want. Otherwise, I don’t know of a simple workaround.
To be clear, I understand that you need to do this, and that pip doesn’t provide the functionality you are after. But the decision on whether functionality should be added to pip isn’t based simply on “does someone need to do this”, we have to look at the wider picture and how many of our users would benefit from any given feature. I’m not aware of ever having had another request for this functionality, which is why I believe it’s of limited value.
I think this is a similar request for the functionality of pip, https://github.com/pypa/pip/issues/5211