4 ms·
pipenv does more than just create a venv, although it is my favorite tool for that. The most important thing it does is freeze the dependency tree using Pipfile
by cityroasted 7y ago
pipenv does more than just create a venv, although it is my favorite tool for that. The most important thing it does is freeze the dependency tree using Pipfile.lock
- blondin 7y ago> it does is freeze the dependency tree using Pipfile.lock sorry but what does freezing the dependency tree mean?
- Redoubts 7y agoprobably recording exact dependency versions, based on a loose requirements.txt and when it was built. You may want this because you have a library that you shouldn't be pinning to the third decimal on a sem-ver package, but that you don't want to hiccup in CI due to a dot-release. Or maybe you think a loose file your tooling can read, and a hyper-specific file your builder should read, is a better interface for a project.
- fhennig 7y agoYes, kind of like that. Except that it doesn't use requirements.txt but rather a file called Pipfile. In there you can also pin version, or leave them unspecified or only partially specified and you can also divide them in dev-packages and normal packages (so it allows for a bit more flexibility than a requirements.txt file).
- blondin 7y agoa bit like "pip freeze > requirements.txt" then?
- vageli 7y ago> a bit like "pip freeze > requirements.txt" then? With the added bonus that it also contains a hash of the package so if someone pushes a new version with the same version number it would complain that the hashes don't match.
- cityroasted 7y agoThe idea is to make builds (more) reproducible. I can build a python program, test it thoroughly, and then be reasonably assured the whole thing won't come crashing down in CI/CD from a bad update to a transient dependency. Then when I want to update the libraries I know I'm doing it purposefully and can commit the new dependency tree to source control.