> So what’s the missing part if I want to use Poetry+pyproject.toml for packaging and get rid of setup.py today?

Your project’s source won’t work with pip. For example when running pip install -e .or installing from a GitHub url. But you probably don’t want to do that anyway if you’re switching to Poetry as it replaces pip. If you are concerned with others using your project being forced to use Poetry that is something to think about though. And if you want to switch back from Poetry you will have to write a setup.py file and/or requirements.txt, Pipfile, etc.

Using Poetry you can publish to PyPI just fine because Poetry builds wheels and sdists that are compatible with pip; it generates a setup.py file when running poetry buildthat is compatible with pip. Pretty cool! And of course you can always run poetry install to have poetry install your lock file to reproduce your exactly dependency tree.

Written by

Software engineer and open source developer https://github.com/cs01, https://twitter.com/grassfedcode

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store