shiv
shiv copied to clipboard
Accept pipenv's Pipfile.lock in place of pip's requirements.txt
When running shiv to build an app file, a good way to include all the other packages your app depends on seems to be to pass in the option, -r requirements.txt
. The requirements.txt
file is managed by pip. But I use pipenv
in preference to pip. Pipenv lists dependencies in a file named Pipfile.lock
.
I would like to have shiv accept Pipfile.lock
in place of requirements.txt
as a way to list all the packages which shiv should install into the app file.
hi @JDLH,
I'm certainly open to supporting Pipefile.lock
, however I lack direct experience with it (or pipenv
, for that matter). My understanding is that pipenv
is compatible with pip
but not the other way around? For projects using Pipfile.lock
would it make sense to use pipenv
to stage the dependencies prior to packaging (similar to how shiv
leverages pip
today)?
Thank you for the reply.
I added this issue as I was learning about shiv and about Python packaging. The underlying problem that I wanted to solve is that my environment managment tool, pipenv, was not communicating with my packaging tool, shiv.
Now I have read more of the Python Packaging User Guide, and I think there are better ways to solve the underlying problem than this. In particular, I just packaged another project where I listed all my dependencies in the pyproject.toml
file. pipenv and shiv were able to communicate via that mechanism.
If it turns out that listing dependencies in pyproject.toml
works robustly, then I am happy to use that, and drop this request. However, in that case there is (if I recall correctly) an issue that the shiv documentation does not describe well how to communicate dependencies via pyproject.toml
.
However, in that case there is (if I recall correctly) an issue that the shiv documentation does not describe well how to communicate dependencies via pyproject.toml.
Very true! I will leave this issue open to address the deficiencies in the current docs & close it once I've given them a once-through. Thanks!