python3.pkgs.pythonRuntimeDepsCheckHook: init

Implements a hook, that checks whether all dependencies, as specified by
the wheel manifest, are present in the current environment.

Complains about missing packages, as well as version specifier
mismatches.
This commit is contained in:
Martin Weinelt
2023-12-20 20:10:22 +01:00
parent a648bdeede
commit 8f3162f83f
6 changed files with 168 additions and 0 deletions
@@ -19,6 +19,7 @@
, pythonOutputDistHook
, pythonRemoveBinBytecodeHook
, pythonRemoveTestsDirHook
, pythonRuntimeDepsCheckHook
, setuptoolsBuildHook
, setuptoolsCheckHook
, wheelUnpackHook
@@ -229,6 +230,13 @@ let
}
else
pypaBuildHook
) (
if isBootstrapPackage then
pythonRuntimeDepsCheckHook.override {
inherit (python.pythonOnBuildForHost.pkgs.bootstrap) packaging;
}
else
pythonRuntimeDepsCheckHook
)] ++ lib.optionals (format' == "wheel") [
wheelUnpackHook
] ++ lib.optionals (format' == "egg") [