From 8f3162f83fcccf26bf50c55ff960fd2dee5264b2 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Mon, 27 Nov 2023 19:14:35 +0100 Subject: 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. --- .../python-modules/bootstrap/packaging/default.nix | 30 ++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 pkgs/development/python-modules/bootstrap/packaging/default.nix (limited to 'pkgs/development/python-modules/bootstrap/packaging') diff --git a/pkgs/development/python-modules/bootstrap/packaging/default.nix b/pkgs/development/python-modules/bootstrap/packaging/default.nix new file mode 100644 index 0000000000000..f8a10d4ddd121 --- /dev/null +++ b/pkgs/development/python-modules/bootstrap/packaging/default.nix @@ -0,0 +1,30 @@ +{ stdenv +, python +, flit-core +, installer +, packaging +}: + +stdenv.mkDerivation { + pname = "${python.libPrefix}-bootstrap-${packaging.pname}"; + inherit (packaging) version src meta; + + buildPhase = '' + runHook preBuild + + PYTHONPATH="${flit-core}/${python.sitePackages}" \ + ${python.interpreter} -m flit_core.wheel + + runHook postBuild + ''; + + installPhase = '' + runHook preInstall + + PYTHONPATH="${installer}/${python.sitePackages}" \ + ${python.interpreter} -m installer \ + --destdir "$out" --prefix "" dist/*.whl + + runHook postInstall + ''; +} -- cgit 1.4.1