diff options
author | OTABI Tomoya <tomoya.otabi@gmail.com> | 2024-07-04 13:41:38 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-04 13:41:38 +0900 |
commit | 1aacb218f03f16293be0e70af7a9fe9a9608d5d2 (patch) | |
tree | 7c4789a41078d3e85776996fc42bbfd27ee1dd68 | |
parent | 0b65cc46a770925cd00708a4895c964f0fd6fd14 (diff) | |
parent | b3aa19a57b6867e611aaa5a00aed400b5201991d (diff) |
Merge pull request #317195 from natsukium/hdmedians
python311Packages.hdmedians: refactor and remove nose
-rw-r--r-- | pkgs/development/python-modules/hdmedians/default.nix | 37 |
1 files changed, 25 insertions, 12 deletions
diff --git a/pkgs/development/python-modules/hdmedians/default.nix b/pkgs/development/python-modules/hdmedians/default.nix index c36314947e10b..2d9ab83819536 100644 --- a/pkgs/development/python-modules/hdmedians/default.nix +++ b/pkgs/development/python-modules/hdmedians/default.nix @@ -2,39 +2,52 @@ lib, buildPythonPackage, fetchPypi, - nose, cython, numpy, + oldest-supported-numpy, + pynose, + pytestCheckHook, + setuptools, }: buildPythonPackage rec { version = "0.14.2"; - format = "setuptools"; pname = "hdmedians"; + pyproject = true; src = fetchPypi { inherit pname version; - sha256 = "b47aecb16771e1ba0736557255d80ae0240b09156bff434321de559b359ac2d6"; + hash = "sha256-tHrssWdx4boHNlVyVdgK4CQLCRVr/0NDId5VmzWawtY="; }; - # nose was specified in setup.py as a build dependency... - buildInputs = [ + postPatch = '' + substituteInPlace setup.py \ + --replace-fail "'nose>=1.0'," "" + ''; + + build-system = [ cython - nose + oldest-supported-numpy + setuptools ]; - propagatedBuildInputs = [ numpy ]; - # cannot resolve path for packages in tests - doCheck = false; + dependencies = [ numpy ]; + + pythonImportsCheck = [ "hdmedians" ]; + + nativeCheckInputs = [ + pynose + pytestCheckHook + ]; - checkPhase = '' - nosetests + preCheck = '' + cd $out ''; meta = with lib; { homepage = "https://github.com/daleroberts/hdmedians"; description = "High-dimensional medians"; - license = licenses.gpl3; + license = licenses.asl20; maintainers = [ ]; }; } |