nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at r-updates 124 lines 2.4 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 pythonAtLeast, 6 7 # build-system 8 setuptools, 9 setuptools-scm, 10 11 # dependencies 12 lazy-loader, 13 matplotlib, 14 15 # tests 16 pytestCheckHook, 17 anywidget, 18 graphviz, 19 h5py, 20 ipympl, 21 ipywidgets, 22 mpltoolbox, 23 pandas, 24 plotly, 25 pooch, 26 pyarrow, 27 pythreejs, 28 scipp, 29 scipy, 30 xarray, 31 32 # tests data 33 symlinkJoin, 34 fetchurl, 35}: 36 37buildPythonPackage (finalAttrs: { 38 pname = "plopp"; 39 version = "26.3.1"; 40 pyproject = true; 41 42 src = fetchFromGitHub { 43 owner = "scipp"; 44 repo = "plopp"; 45 tag = finalAttrs.version; 46 hash = "sha256-A8F2Gd0HmHRlusScFoFulsFaqaXA/HxmtT8ODdRLA+U="; 47 }; 48 49 build-system = [ 50 setuptools 51 setuptools-scm 52 ]; 53 54 dependencies = [ 55 lazy-loader 56 matplotlib 57 ]; 58 59 nativeCheckInputs = [ 60 pytestCheckHook 61 anywidget 62 graphviz 63 h5py 64 ipympl 65 ipywidgets 66 mpltoolbox 67 pandas 68 plotly 69 pooch 70 pyarrow 71 pythreejs 72 scipp 73 scipy 74 xarray 75 ]; 76 77 disabledTests = lib.optionals (pythonAtLeast "3.14") [ 78 # RuntimeError: There is no current event loop in thread 'MainThread' 79 "test_move_cut" 80 "test_value_cuts" 81 ]; 82 83 env = { 84 # See: https://github.com/scipp/plopp/blob/25.05.0/src/plopp/data/examples.py 85 PLOPP_DATA_DIR = 86 let 87 # NOTE this might be changed by upstream in the future. 88 _version = "1"; 89 in 90 symlinkJoin { 91 name = "plopp-test-data"; 92 paths = 93 lib.mapAttrsToList 94 ( 95 file: hash: 96 fetchurl { 97 url = "https://public.esss.dk/groups/scipp/plopp/${_version}/${file}"; 98 inherit hash; 99 downloadToTemp = true; 100 recursiveHash = true; 101 postFetch = '' 102 mkdir -p $out/${_version} 103 mv $downloadedFile $out/${_version}/${file} 104 ''; 105 } 106 ) 107 { 108 "nyc_taxi_data.h5" = "sha256-hso8ESM+uLRf4y2CW/7dpAmm/kysAfJY3b+5vz78w4Q="; 109 "teapot.h5" = "sha256-i6hOw72ce1cBT6FMQTdCEKVe0WOMOjApKperGHoPW34="; 110 }; 111 }; 112 }; 113 114 pythonImportsCheck = [ 115 "plopp" 116 ]; 117 118 meta = { 119 description = "Visualization library for scipp"; 120 homepage = "https://scipp.github.io/plopp/"; 121 license = lib.licenses.bsd3; 122 maintainers = with lib.maintainers; [ doronbehar ]; 123 }; 124})