nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 123 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 = "25.11.0"; 40 pyproject = true; 41 42 src = fetchFromGitHub { 43 owner = "scipp"; 44 repo = "plopp"; 45 tag = finalAttrs.version; 46 hash = "sha256-3vmHRPjv7iUd6ky7XzfdChpAI++ELh6vwmtELK7dwaE="; 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 ]; 81 82 env = { 83 # See: https://github.com/scipp/plopp/blob/25.05.0/src/plopp/data/examples.py 84 PLOPP_DATA_DIR = 85 let 86 # NOTE this might be changed by upstream in the future. 87 _version = "1"; 88 in 89 symlinkJoin { 90 name = "plopp-test-data"; 91 paths = 92 lib.mapAttrsToList 93 ( 94 file: hash: 95 fetchurl { 96 url = "https://public.esss.dk/groups/scipp/plopp/${_version}/${file}"; 97 inherit hash; 98 downloadToTemp = true; 99 recursiveHash = true; 100 postFetch = '' 101 mkdir -p $out/${_version} 102 mv $downloadedFile $out/${_version}/${file} 103 ''; 104 } 105 ) 106 { 107 "nyc_taxi_data.h5" = "sha256-hso8ESM+uLRf4y2CW/7dpAmm/kysAfJY3b+5vz78w4Q="; 108 "teapot.h5" = "sha256-i6hOw72ce1cBT6FMQTdCEKVe0WOMOjApKperGHoPW34="; 109 }; 110 }; 111 }; 112 113 pythonImportsCheck = [ 114 "plopp" 115 ]; 116 117 meta = { 118 description = "Visualization library for scipp"; 119 homepage = "https://scipp.github.io/plopp/"; 120 license = lib.licenses.bsd3; 121 maintainers = with lib.maintainers; [ doronbehar ]; 122 }; 123})