depot/third_party/nixpkgs/pkgs/development/python-modules/ndindex/default.nix
Default email 472aeafc57 Project import generated by Copybara.
GitOrigin-RevId: c31898adf5a8ed202ce5bea9f347b1c6871f32d1
2024-10-04 18:56:33 +02:00

54 lines
1,014 B
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
# build-system
cython,
# optional
numpy,
# tests
hypothesis,
pytest-cov-stub,
pytestCheckHook,
}:
buildPythonPackage rec {
pname = "ndindex";
version = "1.8";
format = "setuptools";
src = fetchFromGitHub {
owner = "Quansight-Labs";
repo = "ndindex";
rev = "refs/tags/${version}";
hash = "sha256-F52ly3NkrZ0H9XoomMqmWfLl+8X0z26Yx67DB8DUqyU=";
};
nativeBuildInputs = [ cython ];
postPatch = ''
substituteInPlace pytest.ini \
--replace "--flakes" ""
'';
optional-dependencies.arrays = [ numpy ];
pythonImportsCheck = [ "ndindex" ];
nativeCheckInputs = [
hypothesis
pytest-cov-stub
pytestCheckHook
] ++ 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 = [ ];
};
}