Hacker News new | ask | show | jobs
by wyuenho 1438 days ago
Use direnv to take care of the virtualenv part of functionality poetry offers, use pip-tools to deal with the dependency management/reproducible build part. Or if you like, straight up pip freeze.

Use pyenv to install all the different python versions you need.

Ideally, all of these functionality should bundled in one tool, but the only thing that's available is pyflow, which don't stop blowing up with an exception for me.

1 comments

Then you're not recommending direnv as a poetry replacement, you're recommending direnv + pip-tools + pyenv. That's a different matter.
The hardest packaging problem in Python is not resolving dependencies or pinning down dependencies. Pip has it largely solved a some years ago. Literally every Python packager using some parts of pip underneath. The messiest part is literally packaging and how to install and isolate the packages.

How you install multiple Python versions doesn't really matter as long as the binaries are on your PATH. You can use Homebrew or Macports or Pyenv or whatever. The only remaining problem is how to manage your virtualenvs. You can use virtualenv or venv directly, but you will have to manage where to put them and remember to activate them before you install dependencies and dev tooling. But if you use direnv, it's fire and forget, once you have direnv setup and one line of directive in a .envrc file, or perhaps a few gitignore, you don't have to think about where to put the virtualenv or remember to activate it again.

So yes, I'm actually just recommending direnv if you want to keep it simple.

> The hardest packaging problem in Python is not resolving dependencies or pinning down dependencies. Pip has it largely solved a some years ago.

I really disagree, and I think so does everyone who uses Poetry, pipenv, pip-tools, etc.