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:
@@ -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
|
||||
'';
|
||||
}
|
||||
Reference in New Issue
Block a user