Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Accept pipenv's Pipfile.lock in place of pip's requirements.txt #219

Open
JDLH opened this issue Jun 18, 2022 · 3 comments
Open

Accept pipenv's Pipfile.lock in place of pip's requirements.txt #219

JDLH opened this issue Jun 18, 2022 · 3 comments

Comments

@JDLH
Copy link

JDLH commented Jun 18, 2022

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.

@lorencarvalho
Copy link
Contributor

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)?

@JDLH
Copy link
Author

JDLH commented Jul 9, 2022

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.

@lorencarvalho
Copy link
Contributor

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants