diff options
author | Fabian Affolter <mail@fabian-affolter.ch> | 2023-11-04 14:13:01 +0100 |
---|---|---|
committer | Fabian Affolter <mail@fabian-affolter.ch> | 2023-11-04 14:13:01 +0100 |
commit | be6b4d8c8be2f8535ecd918f376cb4ee87f15d91 (patch) | |
tree | 6549e8213920d39da12a88a69d259291511ff388 | |
parent | 85f1ba3e51676fa8cc604a3d863d729026a6b8eb (diff) |
python311Packages.cf-xarray: init at 0.8.6
An accessor for xarray objects that interprets CF attributes https://github.com/xarray-contrib/cf-xarray
-rw-r--r-- | pkgs/development/python-modules/cf-xarray/default.nix | 79 | ||||
-rw-r--r-- | pkgs/top-level/python-packages.nix | 2 |
2 files changed, 81 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/cf-xarray/default.nix b/pkgs/development/python-modules/cf-xarray/default.nix new file mode 100644 index 0000000000000..fdbfe0ff71a2a --- /dev/null +++ b/pkgs/development/python-modules/cf-xarray/default.nix @@ -0,0 +1,79 @@ +{ lib +, buildPythonPackage +, dask +, fetchFromGitHub +, matplotlib +, pint +, pooch +, pytestCheckHook +, pythonOlder +, regex +, rich +, scipy +, setuptools +, setuptools-scm +, shapely +, wheel +, xarray +}: + +buildPythonPackage rec { + pname = "cf-xarray"; + version = "0.8.6"; + pyproject = true; + + disabled = pythonOlder "3.9"; + + src = fetchFromGitHub { + owner = "xarray-contrib"; + repo = "cf-xarray"; + rev = "refs/tags/v${version}"; + hash = "sha256-qcoHz/yZoPVu0uBKKx4AV7MOokiuXSCaWPD/92VlRFk="; + }; + + nativeBuildInputs = [ + setuptools + setuptools-scm + wheel + xarray + ]; + + propagatedBuildInputs = [ + xarray + ]; + + passthru.optional-dependencies = { + all = [ + matplotlib + pint + pooch + regex + rich + shapely + ]; + }; + + nativeCheckInputs = [ + dask + pytestCheckHook + scipy + ] ++ lib.flatten (builtins.attrValues passthru.optional-dependencies); + + pythonImportsCheck = [ + "cf_xarray" + ]; + + disabledTestPaths = [ + # Tests require network access + "cf_xarray/tests/test_accessor.py" + "cf_xarray/tests/test_helpers.py" + ]; + + meta = with lib; { + description = "An accessor for xarray objects that interprets CF attributes"; + homepage = "https://github.com/xarray-contrib/cf-xarray"; + changelog = "https://github.com/xarray-contrib/cf-xarray/releases/tag/v${version}"; + license = licenses.asl20; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 806d4d6609fa8..49fdfbce50e02 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -1898,6 +1898,8 @@ self: super: with self; { certvalidator = callPackage ../development/python-modules/certvalidator { }; + cf-xarray = callPackage ../development/python-modules/cf-xarray { }; + cffi = callPackage ../development/python-modules/cffi { }; cffsubr = callPackage ../development/python-modules/cffsubr { }; |