Merge pull request #32544 from FRidh/pythonmodule
Python: rewrite requiredPythonModules to prevent stack overflows
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
, setuptools
|
||||
, unzip
|
||||
, ensureNewerSourcesHook
|
||||
, pythonModule
|
||||
, toPythonModule
|
||||
, namePrefix
|
||||
, bootstrapped-pip
|
||||
, flit
|
||||
@@ -19,7 +19,7 @@ let
|
||||
wheel-specific = import ./build-python-package-wheel.nix { };
|
||||
common = import ./build-python-package-common.nix { inherit python bootstrapped-pip; };
|
||||
mkPythonDerivation = import ./mk-python-derivation.nix {
|
||||
inherit lib python wrapPython setuptools unzip ensureNewerSourcesHook pythonModule namePrefix;
|
||||
inherit lib python wrapPython setuptools unzip ensureNewerSourcesHook toPythonModule namePrefix;
|
||||
};
|
||||
in
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
, unzip
|
||||
, ensureNewerSourcesHook
|
||||
# Whether the derivation provides a Python module or not.
|
||||
, pythonModule
|
||||
, toPythonModule
|
||||
, namePrefix
|
||||
}:
|
||||
|
||||
@@ -60,7 +60,7 @@ if disabled
|
||||
then throw "${name} not supported for interpreter ${python.executable}"
|
||||
else
|
||||
|
||||
python.stdenv.mkDerivation (builtins.removeAttrs attrs [
|
||||
toPythonModule (python.stdenv.mkDerivation (builtins.removeAttrs attrs [
|
||||
"disabled" "checkInputs" "doCheck" "doInstallCheck" "dontWrapPythonPrograms" "catchConflicts"
|
||||
] // {
|
||||
|
||||
@@ -95,14 +95,9 @@ python.stdenv.mkDerivation (builtins.removeAttrs attrs [
|
||||
${python.interpreter} ${./catch_conflicts}/catch_conflicts.py
|
||||
'' + attrs.postFixup or '''';
|
||||
|
||||
passthru = {
|
||||
inherit python; # The python interpreter
|
||||
inherit pythonModule;
|
||||
} // passthru;
|
||||
|
||||
meta = {
|
||||
# default to python's platforms
|
||||
platforms = python.meta.platforms;
|
||||
isBuildPythonPackage = python.meta.platforms;
|
||||
} // meta;
|
||||
})
|
||||
}))
|
||||
|
||||
Reference in New Issue
Block a user