Allow creating requirements.txt files without dev-packages
See original GitHub issueTo install a set of pinned packages in remote systems, there is:
pipenv install --system # won't install dev dependencies
However, this requires both Pipfile
and Pipfile.lock
to be present, and also pipenv
to be installed in the target system. It’s way more inconvenient than just being able to (maybe first copy package wheel into remote system and) say pip install <mypackage>
(and letting pip to pull in the pinned dependencies specified in setup.py
’s install_requires
).
(Or is there some benefit in using pipenv install --system
instead?)
To be able to generate pinned requiremets.txt
that excludes development packages, add --no-dev
option to pipenv lock
, that seems to by default include also dev packages. Or maybe even change to default to match that of pipenv install
, and exclude dev-packages by default?
As per https://github.com/kennethreitz/pipenv/issues/209#issuecomment-278185133 this is already supported in code:
from pipenv.project import Project
from pipenv.utils import convert_deps_to_pip
pfile = Project(chdir=False).parsed_pipfile
requirements = convert_deps_to_pip(pfile['packages'], r=False)
Although there is workaround for this need already, supporting it right in the cli would/could be nice.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:2
- Comments:16 (7 by maintainers)
Top GitHub Comments
@uranusjr thanks but that creates a requirements file with just the development dependencies. I think the best solution is to use
--system
option and ensure the lock file is up-to-date.@wooyek this was a regression in 9.0.0 and will be fixed in the next release.