2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchPypi,
|
|
|
|
cython,
|
|
|
|
numpy,
|
2024-07-27 06:49:29 +00:00
|
|
|
oldest-supported-numpy,
|
|
|
|
pytestCheckHook,
|
|
|
|
setuptools,
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2021-03-12 07:09:13 +00:00
|
|
|
version = "0.14.2";
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "hdmedians";
|
2024-07-27 06:49:29 +00:00
|
|
|
pyproject = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2024-07-27 06:49:29 +00:00
|
|
|
hash = "sha256-tHrssWdx4boHNlVyVdgK4CQLCRVr/0NDId5VmzWawtY=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-07-27 06:49:29 +00:00
|
|
|
patches = [
|
|
|
|
# https://github.com/daleroberts/hdmedians/pull/10
|
|
|
|
./replace-nose.patch
|
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace-fail "'nose>=1.0'," ""
|
|
|
|
'';
|
|
|
|
|
|
|
|
build-system = [
|
2024-06-05 15:53:02 +00:00
|
|
|
cython
|
2024-07-27 06:49:29 +00:00
|
|
|
oldest-supported-numpy
|
|
|
|
setuptools
|
2024-06-05 15:53:02 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-07-27 06:49:29 +00:00
|
|
|
dependencies = [ numpy ];
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "hdmedians" ];
|
|
|
|
|
|
|
|
nativeCheckInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-07-27 06:49:29 +00:00
|
|
|
preCheck = ''
|
|
|
|
cd $out
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/daleroberts/hdmedians";
|
|
|
|
description = "High-dimensional medians";
|
2024-07-27 06:49:29 +00:00
|
|
|
license = licenses.asl20;
|
2023-08-04 22:07:22 +00:00
|
|
|
maintainers = [ ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|