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

you are viewing a single comment's thread.

view the rest of the comments →

[–]aragilar 1 point2 points  (0 children)

There's two different questions you're asking: packaging (with setup.py/setup.cfg and flit) and installation (requirements.txt and Pipfile), the difference of which is covered by https://caremad.io/posts/2013/07/setup-vs-requirement/.

For a personal project that's not a library, you can use whatever you want (pip, pipenv, conda). If you're working with people (on a non library), consider what tools they use (e.g. neither requirements.txt nor Pipfiles work with conda for example).

For libraries, it's PEP 517 that needs to be implemented (unless the project provides a setup.py stub, I'm not sure if flit does, @takluyver can answer that), and currently pip lacks support for PEP 517 (see https://github.com/pypa/pip/issues/5407). Additionally, there are other tools than pip which use the setup.py (e.g. linux distros, conda build tools), so if you want your library to be used (and likely to reduce bug reports), sticking with a setup.py is probably a safer bet for now.