nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at r-updates 73 lines 1.4 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 dask, 5 fetchFromGitHub, 6 matplotlib, 7 pint, 8 pooch, 9 pytestCheckHook, 10 regex, 11 rich, 12 scipy, 13 setuptools-scm, 14 setuptools, 15 shapely, 16 xarray, 17}: 18 19buildPythonPackage (finalAttrs: { 20 pname = "cf-xarray"; 21 version = "0.10.11"; 22 pyproject = true; 23 24 src = fetchFromGitHub { 25 owner = "xarray-contrib"; 26 repo = "cf-xarray"; 27 tag = "v${finalAttrs.version}"; 28 hash = "sha256-SHVSHfB80iLz8uONwH1WoUajef/YT4k0CIzTrHTG3kI="; 29 }; 30 31 build-system = [ 32 setuptools 33 setuptools-scm 34 xarray 35 ]; 36 37 dependencies = [ xarray ]; 38 39 optional-dependencies = { 40 all = [ 41 matplotlib 42 pint 43 pooch 44 regex 45 rich 46 shapely 47 ]; 48 }; 49 50 nativeCheckInputs = [ 51 dask 52 pytestCheckHook 53 scipy 54 ] 55 ++ lib.flatten (builtins.attrValues finalAttrs.passthru.optional-dependencies); 56 57 pythonImportsCheck = [ "cf_xarray" ]; 58 59 disabledTestPaths = [ 60 # Tests require network access 61 "cf_xarray/tests/test_accessor.py" 62 "cf_xarray/tests/test_groupers.py" 63 "cf_xarray/tests/test_helpers.py" 64 ]; 65 66 meta = { 67 description = "Accessor for xarray objects that interprets CF attributes"; 68 homepage = "https://github.com/xarray-contrib/cf-xarray"; 69 changelog = "https://github.com/xarray-contrib/cf-xarray/releases/tag/${finalAttrs.src.tag}"; 70 license = lib.licenses.asl20; 71 maintainers = with lib.maintainers; [ fab ]; 72 }; 73})