2023-03-15 16:39:30 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
|
|
|
|
# build-system
|
|
|
|
, cython
|
|
|
|
|
|
|
|
# optional
|
|
|
|
, numpy
|
|
|
|
|
|
|
|
# tests
|
|
|
|
, hypothesis
|
|
|
|
, pytest-cov
|
|
|
|
, pytestCheckHook
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "ndindex";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "1.8";
|
2023-03-15 16:39:30 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Quansight-Labs";
|
|
|
|
repo = "ndindex";
|
|
|
|
rev = "refs/tags/${version}";
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-F52ly3NkrZ0H9XoomMqmWfLl+8X0z26Yx67DB8DUqyU=";
|
2023-03-15 16:39:30 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
cython
|
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pytest.ini \
|
|
|
|
--replace "--cov=ndindex/ --cov-report=term-missing --flakes" ""
|
|
|
|
'';
|
|
|
|
|
|
|
|
passthru.optional-dependencies.arrays = [
|
|
|
|
numpy
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"ndindex"
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeCheckInputs = [
|
|
|
|
hypothesis
|
|
|
|
pytest-cov # uses cov markers
|
|
|
|
pytestCheckHook
|
|
|
|
] ++ passthru.optional-dependencies.arrays;
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "";
|
|
|
|
homepage = "https://github.com/Quansight-Labs/ndindex";
|
|
|
|
changelog = "https://github.com/Quansight-Labs/ndindex/releases/tag/${version}";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ ];
|
|
|
|
};
|
|
|
|
}
|