by algorias · 12y ago · 0 comments
Even small projects get cluttered requirements.txt files very fast, causing unneeded packages to spread like viruses from venv to venv, requiring coordination from the whole team to definitely eradicate, because one member's sloppy hygiene spreads the contagion back to everyone.
I don't know if pip-compile is the right answer to that problem, but it certainly seems to go in the right direction, providing living documentation of your direct requirements in the requirements.in file.
IMHO we'd first need to standardize how dependencies are managed (requirements.txt, setup.py ...)and then build a solution off that. if you have requirements.txt-based setup, is easy to e.g. recursively download/parse to get the full list of dependencies.
The requirements.in file reminds me of automake.
I don't really like the idea of consolidating dependencies locally because you'll end up with a big compiled requirements.txt which then you have to maintain yourself. IMHO it'll be a drag when you'll update a 3rd party dependency which has its own changed dependencies...
I don't really see how it's much different from Gemfile.lock for Ruby or npm-shrinkwrap.json for Node.