Support for pip --constraint
See original GitHub issueIs your feature request related to a problem? Please describe.
Some projects recommend installing using pip with --constraint:
pip install
apache-airflow==1.10.12
–constraint “https://raw.githubusercontent.com/apache/airflow/constraints-1.10.12/constraints-3.7.txt”
It would be nice to have an equivalent pipenv command. The idea is that some project already provide all the resolved dependencies (an equivalent of the Pipfile.lock file) that should be input to the dependency resolution step.
Describe the solution you’d like
Add a --constraint parameter to pipenv that behaves as pip --constraint does.
Describe alternatives you’ve considered
I think there is no alternative but to drop the --constraint and hope that the dependencies’ version resolved by pipenv match the ones that in the project’s constraints.
Additional context
Issue Analytics
- State:
- Created 3 years ago
- Reactions:24
- Comments:11 (3 by maintainers)
Top Results From Across the Web
User Guide - pip documentation v22.3.1
Constraints files are requirements files that only control which version of a requirement is installed, not whether it is installed or not. Their...
Read more >Pip constraints files - Blog | luminousmen
Pip constraints files ... In python, it is common practice to write all the application dependencies that are installed via pip into a...
Read more >Yes, and in addition to the requirements file, pip supports a ...
Yes, and in addition to the requirements file, pip supports a constraints file, which is the lockfile you describe. It's separate from the...
Read more >PIP Constraints Files - python - Stack Overflow
Constraints files are requirements files that only control which version of a requirement is installed, not whether it is installed or not.
Read more >User Guide — pip 10.0.0.dev0 documentation
Constraints files are requirements files that only control which version of a requirement is installed, not whether it is installed or not. Their...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@uranusjr a case in which a constraint should not be placed in the
Pipfileis when the constraint is intended to be relative to the lock file. In a monorepo situation, it is desireable to have a singlePipfilecontrol dependencies as a whole and then have subsystems each list their own minimal list of requirements…pip --constraints <...>allows you to indicate that for that subsystem, if a dependency is explicitly or implicitly listed as a dependency, then the version used shall be the version in the constraints file, but if it isn’t listed as a dependency then it should not be. It would be very helpful ifpipenvsupported this as well.I feel it would be much more explicit (and reproducible) if the constraints are put directly into Pipfile. Maybe what we should do instead is to have a way to sync constraint files and Pipfile, instead