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:
parent
ae4a1a485a
commit
d2e9be2b07
@ -61,6 +61,10 @@
|
||||
- `reaction` has been updated to version 2, which includes some breaking changes.
|
||||
For more information, [check the release article](https://blog.ppom.me/en-reaction-v2).
|
||||
|
||||
- The `buildPythonPackage` and `buildPythonApplication` functions now require
|
||||
an explicit `format` attribute. Previously the default format used setuptools
|
||||
and called `setup.py` from the source tree, which is deprecated.
|
||||
The modern alternative is to configure `pyproject = true` with `build-system = [ setuptools ]`.
|
||||
|
||||
### Deprecations {#sec-nixpkgs-release-25.11-lib-deprecations}
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user