-
-
Notifications
You must be signed in to change notification settings - Fork 18.7k
Python: deprecate format and default to pyproject #253154
Copy link
Copy link
Open
Labels
3.skill: sprintableA larger issue which is split into distinct actionable tasksA larger issue which is split into distinct actionable tasks5.scope: trackingLong-lived issue tracking long-term fixes or multiple sub-problemsLong-lived issue tracking long-term fixes or multiple sub-problems6.topic: pythonPython is a high-level, general-purpose programming language.Python is a high-level, general-purpose programming language.
Metadata
Metadata
Assignees
Labels
3.skill: sprintableA larger issue which is split into distinct actionable tasksA larger issue which is split into distinct actionable tasks5.scope: trackingLong-lived issue tracking long-term fixes or multiple sub-problemsLong-lived issue tracking long-term fixes or multiple sub-problems6.topic: pythonPython is a high-level, general-purpose programming language.Python is a high-level, general-purpose programming language.
Fields
Give feedbackNo fields configured for issues without a type.
Motivation
Since the introduction of PEP 518 and some following PEPs that expands on the idea, the
pyproject.tomlformat 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 withformat = "pyproject"becausepyproject.tomlfalls back to usingsetuptoolsas its build backend as documented by pypa even if the package doesn't have apyproject.toml. This might actually be preferred, because I ran into issues withformat = "setuptools"when trying to package asetup.pypackage.Proposal
I am proposing to deprecate the
formatoption and replacing it with apyprojectoption for packages that don't work with pyproject. We can do this over a longer period of time:pyprojectoption that conflicts with the existingformatoption, wheretrueis equivalent toformat = "pyproject"andfalseis equivalent toformat = "other"pyprojectoption instead offormatformat = "setuptools"andformat = "pyproject"topyproject = trueand the rest topyproject = falseformatwith a warning and make the default behaviorpyproject = true(instead offormat = "setuptools")pyproject = trues, as this is now the defaultformatoption altogetherRelated Issues
format = "setuptools";as default #124051