buildPython*: throw on empty format

This is the ratchet that disallows introducing new python packages that
do not define a package format.
This commit is contained in:
Martin Weinelt
2025-07-02 10:18:35 +02:00
parent ae4a1a485a
commit d2e9be2b07
2 changed files with 8 additions and 3 deletions
@@ -211,7 +211,7 @@ let
else if format != null then
format
else
"setuptools";
throw "${name} does not configure a `format`. To build with setuptools as before, set `pyproject = true` and `build-system = [ setuptools ]`.`";
withDistOutput = withDistOutput' format';
@@ -268,11 +268,12 @@ let
isSetuptoolsDependency = isSetuptoolsDependency' (attrs.pname or null);
name = namePrefix + attrs.name or "${finalAttrs.pname}-${finalAttrs.version}";
in
(cleanAttrs attrs)
// {
name = namePrefix + attrs.name or "${finalAttrs.pname}-${finalAttrs.version}";
inherit name;
inherit catchConflicts;