4 ms·
I'm not sure what Poetry tries this to simplify on the development side... using venv and pip/requirements.txt is simple enough for me. And you don't even have
by guggle 7y ago
I'm not sure what Poetry tries this to simplify on the development side... using venv and pip/requirements.txt is simple enough for me. And you don't even have to do it by hand, Pycharm will do it for you and activate the right venv in the shell tab. Distribution is something else, but I wouldn't expect users to type commands in a shell anyway, so there is only a need for one-click installers and/or self contained executables, where poetry does nothing it seems (Nuitka/PyInstaller and other solutions will help here).
- sametmax 7y agoIn deployment you'll still need to use the command line. Poetry is IDE and OS agnostic. It manages also the lock file, and resolve deps better than pip. At last, it lets you put all meta data in one file, including dev deps, then build a wheel. You can do that with regular setuptool and setup.cfg and it's compatible with pip though.
- guggle 7y agoI don't have a problem with the command line, I just find the argument of "tool X and tool Y are boring to use so you'd better tool Z" (as found on the linked article) a bit weak. I guess that's one of these tools that solves problems I don't have (like the need for a lock file... just specify the version in requirements.txt), so unless it becomes the new standard, I'll stay away from it. But I'm sure it's gonna be helpful for many.
- sametmax 7y agoThe lock file doesn't just specify the version of the packages, but of all dependancies as well, in a nested manner. This let poetry detects incompatibilites you can't with a flat requirement file. Poetry also updates the files properly at each install, so you don't have to do it. And it can't install something outside of a venv by mistake. But yes, a requirement file is ok in many cases. I use them myself often.
- robertlagrant 7y agousing venv and pip/requirements.txt is simple enough for me Sure - it depends on what you're doing. Requirements.txt won't work if you're writing a library; you'll need to move (or duplicate) your dependencies into setup.py.
- guggle 7y agoIndeed.. I stopped writing libraries when I switched to Python, because for all my needs there are better ones out there than those I could write. Only write apps now... :)
- sametmax 7y agoYes, it's still very valid. It's simple. It's baked in. However, the benefit of moving to setup.cfg (not setup.py anymore, which should be almost empty) is more than making a lib. It makes deployment easier, and dev as well. Hell, you can even pip install from git repo with it. I made a summary of what to use for what, when and how in this comment: https://news.ycombinator.com/item?id=20132303 https://news.ycombinator.com/item?id=20132303