From 5d737fef1a1e43e7d0a6309feb579dd921e058f1 Mon Sep 17 00:00:00 2001 From: Eric Berquist Date: Sun, 4 Aug 2024 15:34:50 -0400 Subject: [PATCH] python3Packages.array-api-strict: init at 2.0.1 --- .../array-api-strict/default.nix | 49 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 51 insertions(+) create mode 100644 pkgs/development/python-modules/array-api-strict/default.nix diff --git a/pkgs/development/python-modules/array-api-strict/default.nix b/pkgs/development/python-modules/array-api-strict/default.nix new file mode 100644 index 000000000000..d562aac4c523 --- /dev/null +++ b/pkgs/development/python-modules/array-api-strict/default.nix @@ -0,0 +1,49 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + setuptools, + numpy, + pytestCheckHook, + hypothesis, + nix-update-script, +}: + +buildPythonPackage rec { + pname = "array-api-strict"; + version = "2.0.1"; + pyproject = true; + + src = fetchFromGitHub { + owner = "data-apis"; + repo = "array-api-strict"; + rev = "refs/tags/${version}"; + hash = "sha256-sGuMhtxhXXFD6KAiujuWdDe2+gKYN3ijiXvi07a2AgA="; + }; + + build-system = [ setuptools ]; + + dependencies = [ numpy ]; + + nativeCheckInputs = [ + pytestCheckHook + hypothesis + ]; + + pythonImportsCheck = [ "array_api_strict" ]; + + disabledTests = [ + "test_disabled_extensions" + "test_environment_variables" + ]; + + passthru.updateScript = nix-update-script { }; + + meta = with lib; { + homepage = "https://data-apis.org/array-api-strict"; + changelog = "https://github.com/data-apis/array-api-strict/releases/tag/${version}"; + description = "A strict, minimal implementation of the Python array API"; + license = licenses.bsd3; + maintainers = [ maintainers.berquist ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 9abd47731678..5034a3407499 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -773,6 +773,8 @@ self: super: with self; { arnparse = callPackage ../development/python-modules/arnparse { }; + array-api-strict = callPackage ../development/python-modules/array-api-strict { }; + array-record = callPackage ../development/python-modules/array-record { }; arrayqueues = callPackage ../development/python-modules/arrayqueues { };