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