-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
Description
Motivation
Since the introduction of PEP 518 and some following PEPs that expands on the idea, the pyproject.toml format has gained a lot of adoption and became the de facto format for python packages.
However, a more popular option, and the current default format in nixpkgs is setuptools. Luckily, we might still be able to build these packages with format = "pyproject" because pyproject.toml falls back to using setuptools as its build backend as documented by pypa even if the package doesn't have a pyproject.toml. This might actually be preferred, because I ran into issues with format = "setuptools" when trying to package a setup.py package.
Proposal
I am proposing to deprecate the format option and replacing it with a pyproject option for packages that don't work with pyproject. We can do this over a longer period of time:
- introduce a
pyprojectoption that conflicts with the existingformatoption, wheretrueis equivalent toformat = "pyproject"andfalseis equivalent toformat = "other" - enforce newly added python packages to use the
pyprojectoption instead offormat - convert existing
format = "setuptools"andformat = "pyproject"topyproject = trueand the rest topyproject = false - deprecate
formatwith a warning and make the default behaviorpyproject = true(instead offormat = "setuptools") - remove all
pyproject = trues, as this is now the default - remove the
formatoption altogether