From 8fd4ec82f9561722eb1874d0368fc03e444fa96e Mon Sep 17 00:00:00 2001 From: natsukium Date: Sat, 4 Nov 2023 00:58:17 +0900 Subject: [PATCH] python311Packages.line-profiler: use pytestCheckHook --- .../python-modules/line-profiler/default.nix | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/pkgs/development/python-modules/line-profiler/default.nix b/pkgs/development/python-modules/line-profiler/default.nix index d929b5e214bf..e962d8e341f8 100644 --- a/pkgs/development/python-modules/line-profiler/default.nix +++ b/pkgs/development/python-modules/line-profiler/default.nix @@ -4,11 +4,11 @@ , cython , isPyPy , ipython -, python , scikit-build , cmake , pythonOlder , pytestCheckHook +, ubelt }: buildPythonPackage rec { @@ -30,13 +30,14 @@ buildPythonPackage rec { scikit-build ]; - propagatedBuildInputs = [ - ipython - ]; + passthru.optional-dependencies = { + ipython = [ ipython ]; + }; nativeCheckInputs = [ pytestCheckHook - ]; + ubelt + ] ++ passthru.optional-dependencies.ipython; dontUseCmakeConfigure = true; @@ -44,8 +45,9 @@ buildPythonPackage rec { rm -f _line_profiler.c ''; - checkPhase = '' - PYTHONPATH=$out/${python.sitePackages}:$PYTHONPATH cd tests && ${python.interpreter} -m unittest discover -s . + preCheck = '' + rm -r line_profiler + export PATH=$out/bin:$PATH ''; pythonImportsCheck = [