pythonsetuptoolssetup.pypython-packagingpyproject.toml

What are the downsides to relying purely on pyproject.toml?


Say you have a Python program that you can successfully package using only pyproject.toml. What are the downsides? Why use setup.py or setup.cfg in this case?


Solution

  • There is no downside in not having a setup.py. It is just that in some particular cases some elements of the packaging can not be expressed in a descriptive manner (which means without code) in setup.cfg or pyproject.toml. This can range from some custom dynamic package metadata to the handling of packaging for custom non-Python code and many other things.

    My recommendation is:

    Related: