4 ms·
I recently switched from Poetry (to which I switched after pipenv) to pip-tools for some projects, because Poetry was not able to work properly with some depend
by aequitas 7y ago
I recently switched from Poetry (to which I switched after pipenv) to pip-tools for some projects, because Poetry was not able to work properly with some dependencies.
Pip-tools has been a dream. It is just a thin layer of tools on top of Pip that separates your 'abstract' requirements (eg: django<3) from your 'release' requirements (eg: django==2.2.5) and managing running pip to have your virtualenv reflect your exact requirements.
No new standard like pyproject that is partially supported (by 3rd party that is), no intention to (but failing at) being the all dominating way to do python packaging.
Just a tool that is there to help you.
edit: it also automates updating the release requirements file (within the constraints of the abstract requirements).
- yingw787 7y agoI’ve heard good things wrt determinism and packaging for different environments (dev/test/prod) on top of the simplicity!
- aequitas 7y agoHave a look at https://github.com/jazzband/pip-tools#workflow-for-layered-requirements https://github.com/jazzband/pip-tools#workflow-for-layered-r... Both the 'input' and 'output' requirements are pip compatible files (just with different extensions). It uses pip features like '-c' to include other contraints in your requirements. For me, if they would merge Pip-tools into Pip and call it a day, my package management issues for Python are solved.
- cik 7y agoThanks for this. I've been a poetry fan since... the first release and pipenv really just fails for me. I'm going to check out pip-tools today.
- takeda 7y agoNever used poetry, but pip tools is especially easy to integrate with CI/CD, because they are CLI commands that do specific simple tasks and don't hide things from the caller. I personally use setup.py (my setup.py only calls setup() and all configuration is declaratively defined in setup.cfg) the pip-compile generates a version lock (requirements.txt) and that is passed between environments, so we are ensuring that the exact same dependencies are installed during deployment.
- wyclif 7y agoI like that poetry uses pyproject.toml to replace setup.py, requirements.txt, setup.cfg, MANIFEST.in and the newly added Pipfile. Simplifying it to one file seems smart.