pipenv requirements sub-command based on Pipfile #6130
Labels
Contributor Candidate
The issue has been identified/triaged and contributions are welcomed/encouraged.
good first issue
Issues suitable as a newcomer to get familiar with Pipenv!
Type: Enhancement 💡
This is a feature or enhancement request.
Is your feature request related to a problem? Please describe.
I develop both projects which purpose is applications (where I want to pin all dependencies) and libraries (were I do not want to pin my dependencies, since it has to be in an environment with other packages selected by the developer whom also want to use my library, without causing a conflict).
It would be fantastic if I could use pipenv for both of these purposes. And the only feature missing from pipenv is currently the ability to generate a requierments.txt file with only the root of the dependency tree. That can be referenced as a list of dependencies when building my package
python -m build
and various CI and development workflows. So to clarify: what I would like to do is generate a file based on the content of the Pipfile, not the Pipfile.lock.Example:
Draft of desired output:
$ pipenv requirements --NEW_OPTION requests pydantic==1.10.14 $ pipenv requirements --NEW_OPTION --categories style ruff<=0.3.5
I need to have the option of installing packages from a requirements.txt file. And with this new proposed feature I do not need to maintain the package dependencies in more than one place when changes happens and risk them being out of sync with each-other. I can simply have this command being ran in a pipeline or similar and fellow developers/CI-runners whom might not have pipenv installed can also use my project.
I also use these requirements.txt files for dynamic specification of requirements in setuptools.
Describe the solution you'd like
I would like an additional flag added to the
pipenv requirements
sub-command that reads from the Pipfile, not the Pipfile.lock and only takes the root packages of the dependency tree into account.Describe alternatives you've considered
Developing a new application to support this scenario. With help of pkg_resources, however the API is "deprecated". And I would like to avoid introducing additional dependencies.
pip
does not support anything similar as well.Additional context
N/A
The text was updated successfully, but these errors were encountered: