Merge staging-next into staging
This commit is contained in:
@@ -87,6 +87,10 @@ let
|
||||
pythonOnBuildForTarget = pkgsBuildTarget.${pythonAttr};
|
||||
pythonOnHostForHost = pkgsHostHost.${pythonAttr};
|
||||
pythonOnTargetForTarget = pkgsTargetTarget.${pythonAttr} or { };
|
||||
pythonABITags = [
|
||||
"none"
|
||||
"cp${sourceVersion.major}${sourceVersion.minor}"
|
||||
];
|
||||
}
|
||||
// {
|
||||
inherit ucsEncoding;
|
||||
|
||||
@@ -195,6 +195,12 @@ let
|
||||
pythonOnHostForHost
|
||||
pythonOnTargetForTarget
|
||||
;
|
||||
|
||||
pythonABITags = [
|
||||
"abi3"
|
||||
"none"
|
||||
"cp${sourceVersion.major}${sourceVersion.minor}${lib.optionalString (!enableGIL) "t"}"
|
||||
];
|
||||
};
|
||||
|
||||
version = with sourceVersion; "${major}.${minor}.${patch}${suffix}";
|
||||
|
||||
@@ -106,7 +106,6 @@ let
|
||||
"doInstallCheck"
|
||||
"pyproject"
|
||||
"format"
|
||||
"outputs"
|
||||
"stdenv"
|
||||
"dependencies"
|
||||
"optional-dependencies"
|
||||
@@ -204,10 +203,24 @@ let
|
||||
self = stdenv.mkDerivation (
|
||||
finalAttrs:
|
||||
let
|
||||
getFinalPassthru =
|
||||
let
|
||||
pos = unsafeGetAttrPos "passthru" finalAttrs;
|
||||
in
|
||||
attrName:
|
||||
finalAttrs.passthru.${attrName} or (throw (
|
||||
''
|
||||
${finalAttrs.name}: passthru.${attrName} missing after overrideAttrs overriding.
|
||||
''
|
||||
+ optionalString (pos != null) ''
|
||||
Last overridden at ${pos.file}:${toString pos.line}
|
||||
''
|
||||
));
|
||||
|
||||
format' =
|
||||
assert (pyproject != null) -> (format == null);
|
||||
if pyproject != null then
|
||||
if pyproject then "pyproject" else "other"
|
||||
assert (getFinalPassthru "pyproject" != null) -> (format == null);
|
||||
if getFinalPassthru "pyproject" != null then
|
||||
if getFinalPassthru "pyproject" then "pyproject" else "other"
|
||||
else if format != null then
|
||||
format
|
||||
else
|
||||
@@ -262,11 +275,11 @@ let
|
||||
in
|
||||
attrName: inputs: map (checkDrv attrName) inputs;
|
||||
|
||||
isBootstrapInstallPackage = isBootstrapInstallPackage' (attrs.pname or null);
|
||||
isBootstrapInstallPackage = isBootstrapInstallPackage' (finalAttrs.pname or null);
|
||||
|
||||
isBootstrapPackage = isBootstrapInstallPackage || isBootstrapPackage' (attrs.pname or null);
|
||||
isBootstrapPackage = isBootstrapInstallPackage || isBootstrapPackage' (finalAttrs.pname or null);
|
||||
|
||||
isSetuptoolsDependency = isSetuptoolsDependency' (attrs.pname or null);
|
||||
isSetuptoolsDependency = isSetuptoolsDependency' (finalAttrs.pname or null);
|
||||
|
||||
name = namePrefix + attrs.name or "${finalAttrs.pname}-${finalAttrs.version}";
|
||||
|
||||
@@ -294,13 +307,15 @@ let
|
||||
#
|
||||
pythonCatchConflictsHook
|
||||
]
|
||||
++ optionals (attrs ? pythonRelaxDeps || attrs ? pythonRemoveDeps) [
|
||||
pythonRelaxDepsHook
|
||||
]
|
||||
++
|
||||
optionals (finalAttrs.pythonRelaxDeps or [ ] != [ ] || finalAttrs.pythonRemoveDeps or [ ] != [ ])
|
||||
[
|
||||
pythonRelaxDepsHook
|
||||
]
|
||||
++ optionals removeBinBytecode [
|
||||
pythonRemoveBinBytecodeHook
|
||||
]
|
||||
++ optionals (hasSuffix "zip" (attrs.src.name or "")) [
|
||||
++ optionals (hasSuffix "zip" (finalAttrs.src.name or "")) [
|
||||
unzip
|
||||
]
|
||||
++ optionals (format' == "setuptools") [
|
||||
@@ -355,13 +370,13 @@ let
|
||||
pythonOutputDistHook
|
||||
]
|
||||
++ nativeBuildInputs
|
||||
++ build-system;
|
||||
++ getFinalPassthru "build-system";
|
||||
|
||||
buildInputs = validatePythonMatches "buildInputs" (buildInputs ++ pythonPath);
|
||||
|
||||
propagatedBuildInputs = validatePythonMatches "propagatedBuildInputs" (
|
||||
propagatedBuildInputs
|
||||
++ dependencies
|
||||
++ getFinalPassthru "dependencies"
|
||||
++ [
|
||||
# we propagate python even for packages transformed with 'toPythonApplication'
|
||||
# this pollutes the PATH but avoids rebuilds
|
||||
@@ -396,20 +411,17 @@ let
|
||||
outputs = outputs ++ optional withDistOutput "dist";
|
||||
|
||||
passthru = {
|
||||
inherit disabled;
|
||||
inherit
|
||||
disabled
|
||||
pyproject
|
||||
build-system
|
||||
dependencies
|
||||
optional-dependencies
|
||||
;
|
||||
}
|
||||
// {
|
||||
updateScript = nix-update-script { };
|
||||
}
|
||||
// optionalAttrs (dependencies != [ ]) {
|
||||
inherit dependencies;
|
||||
}
|
||||
// optionalAttrs (optional-dependencies != { }) {
|
||||
inherit optional-dependencies;
|
||||
}
|
||||
// optionalAttrs (build-system != [ ]) {
|
||||
inherit build-system;
|
||||
}
|
||||
// attrs.passthru or { };
|
||||
|
||||
meta = {
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
pythonOnHostForHost,
|
||||
pythonOnTargetForTarget,
|
||||
pythonAttr ? null,
|
||||
pythonABITags ? [ "none" ],
|
||||
self, # is pythonOnHostForTarget
|
||||
}:
|
||||
let
|
||||
@@ -141,6 +142,7 @@ rec {
|
||||
pythonOlder = lib.versionOlder pythonVersion;
|
||||
inherit hasDistutilsCxxPatch;
|
||||
inherit pythonOnBuildForHost;
|
||||
inherit pythonABITags;
|
||||
|
||||
tests = callPackage ./tests.nix {
|
||||
python = self;
|
||||
|
||||
@@ -67,6 +67,11 @@ let
|
||||
pythonOnBuildForTarget = pkgsBuildTarget.${pythonAttr};
|
||||
pythonOnHostForHost = pkgsHostHost.${pythonAttr};
|
||||
pythonOnTargetForTarget = pkgsTargetTarget.${pythonAttr} or { };
|
||||
|
||||
pythonABITags = [
|
||||
"none"
|
||||
"pypy${lib.concatStrings (lib.take 2 (lib.splitString "." pythonVersion))}_pp${sourceVersion.major}${sourceVersion.minor}"
|
||||
];
|
||||
};
|
||||
pname = passthru.executable;
|
||||
version = with sourceVersion; "${major}.${minor}.${patch}";
|
||||
|
||||
@@ -48,6 +48,11 @@ let
|
||||
pythonOnBuildForTarget = throw "${pname} does not support cross compilation";
|
||||
pythonOnHostForHost = throw "${pname} does not support cross compilation";
|
||||
pythonOnTargetForTarget = throw "${pname} does not support cross compilation";
|
||||
|
||||
pythonABITags = [
|
||||
"none"
|
||||
"pypy${lib.concatStrings (lib.take 2 (lib.splitString "." pythonVersion))}_pp${sourceVersion.major}${sourceVersion.minor}"
|
||||
];
|
||||
};
|
||||
pname = "${passthru.executable}_prebuilt";
|
||||
version = with sourceVersion; "${major}.${minor}.${patch}";
|
||||
|
||||
@@ -48,6 +48,11 @@ let
|
||||
pythonOnBuildForTarget = throw "${pname} does not support cross compilation";
|
||||
pythonOnHostForHost = throw "${pname} does not support cross compilation";
|
||||
pythonOnTargetForTarget = throw "${pname} does not support cross compilation";
|
||||
|
||||
pythonABITags = [
|
||||
"none"
|
||||
"pypy${lib.concatStrings (lib.take 2 (lib.splitString "." pythonVersion))}_pp${sourceVersion.major}${sourceVersion.minor}"
|
||||
];
|
||||
};
|
||||
pname = "${passthru.executable}_prebuilt";
|
||||
version = with sourceVersion; "${major}.${minor}.${patch}";
|
||||
|
||||
Reference in New Issue
Block a user