From a8e98ca375df8dba376877abb55794be6e9966c2 Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Mon, 27 Jan 2025 18:27:52 +0200 Subject: [PATCH] python312Packages.pint-xarray: init at 0.4 --- .../python-modules/pint-xarray/default.nix | 51 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 53 insertions(+) create mode 100644 pkgs/development/python-modules/pint-xarray/default.nix diff --git a/pkgs/development/python-modules/pint-xarray/default.nix b/pkgs/development/python-modules/pint-xarray/default.nix new file mode 100644 index 000000000000..5d38fa108940 --- /dev/null +++ b/pkgs/development/python-modules/pint-xarray/default.nix @@ -0,0 +1,51 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + setuptools, + setuptools-scm, + numpy, + pint, + xarray, + pytestCheckHook, +}: + +buildPythonPackage rec { + pname = "pint-xarray"; + version = "0.4"; + pyproject = true; + + src = fetchFromGitHub { + owner = "xarray-contrib"; + repo = "pint-xarray"; + tag = "v${version}"; + hash = "sha256-IFHSgrnqS7ZpNhRzzSgHPRUP90WNv84jBH4um/DRMCU="; + }; + + build-system = [ + setuptools + setuptools-scm + ]; + + dependencies = [ + numpy + pint + xarray + ]; + + nativeCheckInputs = [ + pytestCheckHook + ]; + + pythonImportsCheck = [ + "pint_xarray" + ]; + + meta = { + description = "Interface for using pint with xarray, providing convenience accessors"; + homepage = "https://github.com/xarray-contrib/pint-xarray"; + changelog = "https://github.com/xarray-contrib/pint-xarray/blob/v${version}/docs/whats-new.rst"; + license = lib.licenses.asl20; + maintainers = with lib.maintainers; [ doronbehar ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 54ea65a96643..0d64801ea78c 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -10451,6 +10451,8 @@ self: super: with self; { pint-pandas = callPackage ../development/python-modules/pint-pandas { }; + pint-xarray = callPackage ../development/python-modules/pint-xarray { }; + pip = callPackage ../development/python-modules/pip { }; pipdate = callPackage ../development/python-modules/pipdate { };