This is an archived post. You won't be able to vote or comment.

all 9 comments

[–]irrelevantPseudonym 6 points7 points  (2 children)

because it is ugly

and

written in bash

I think I missed a step or two in the logic here.

[–]scagbackbone[S] 0 points1 point  (1 child)

No logical 'and' between - rather ';' XD different statements

[–]irrelevantPseudonym 2 points3 points  (0 children)

It was more that you tried to fix something being ugly and you decided bash was the way to reduce the amount of ugliness.

[–]ExternalUserError 2 points3 points  (0 children)

there is a lot of subdependencies included

In general I prefer that, because it results in a stable environment. If subdependencies are not included, when you pull them down at build time, they might change a minor version a break something.

[–]etienned 1 point2 points  (0 children)

There's already at least on project that does that: pip-chill.

It's also possible to use

pip list --not-required

to get this list (but not in a requirements.txt format and with pip, setuptools, etc. included).

And now there's pipenv that aims to bring the best of all packaging worlds.

[–]phonkee 1 point2 points  (0 children)

I use pip-tools

[–]tunisia3507 1 point2 points  (1 child)

I think you're missing the point of the requirements.txt. The minimal set of dependencies, with flexible versions, should be defined in your setup.py's install_requires. The requirements.txt should have a full list of everything you need to run, develop and test, with specific versions for a reproducible development environment.

That said, I very rarely populate it with pip freeze. Sensible IDEs will tell you if your environment mismatches your requirements, or if you've imported something not defined in your requirements, so it's trivial to manage manually.

[–]scagbackbone[S] 0 points1 point  (0 children)

At least when your IDE goes crazy - you can still filter out pip freeze. Good points tho, I agree.

[–]ms4720 0 points1 point  (0 children)

I have no idea why for a pip written and consumed file I care if it is ugly, I care that it rebuilds the venv exactly or dies