buildPython*: minor changes to prepare for restructuring (#378566)

This commit is contained in:
Yueh-Shun Li
2025-02-02 14:21:25 +08:00
committed by GitHub
@@ -205,10 +205,9 @@ in
...
}@attrs:
assert (pyproject != null) -> (format == null);
let
format' =
assert (pyproject != null) -> (format == null);
if pyproject != null then
if pyproject then "pyproject" else "other"
else if format != null then
@@ -274,6 +273,7 @@ let
# Keep extra attributes from `attrs`, e.g., `patchPhase', etc.
self = toPythonModule (
stdenv.mkDerivation (
finalAttrs:
(cleanAttrs attrs)
// {
@@ -400,13 +400,12 @@ let
{
inherit disabled;
}
// attrs.passthru or { }
// {
updateScript =
let
filename = head (splitString ":" self.meta.position);
filename = head (splitString ":" finalAttrs.finalPackage.meta.position);
in
attrs.passthru.updateScript or [
[
update-python-libraries
filename
];
@@ -419,7 +418,8 @@ let
}
// optionalAttrs (build-system != [ ]) {
inherit build-system;
};
}
// attrs.passthru or { };
meta = {
# default to python's platforms