1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5
6 # build-system
7 hatch-vcs,
8 hatchling,
9
10 # dependencies
11 awkward,
12 cramjam,
13 fsspec,
14 numpy,
15 packaging,
16
17 # tests
18 awkward-pandas,
19 pandas,
20 pytest-timeout,
21 pytestCheckHook,
22 rangehttpserver,
23 scikit-hep-testdata,
24 writableTmpDirAsHomeHook,
25 xxhash,
26}:
27
28buildPythonPackage rec {
29 pname = "uproot";
30 version = "5.6.6";
31 pyproject = true;
32
33 src = fetchFromGitHub {
34 owner = "scikit-hep";
35 repo = "uproot5";
36 tag = "v${version}";
37 hash = "sha256-1zZr+SrGRNBz/Wd1cT2aYOH/MzSZTCuqxYIlA+NXqLk=";
38 };
39
40 build-system = [
41 hatch-vcs
42 hatchling
43 ];
44
45 dependencies = [
46 awkward
47 cramjam
48 fsspec
49 numpy
50 packaging
51 xxhash
52 ];
53
54 nativeCheckInputs = [
55 awkward-pandas
56 pandas
57 pytest-timeout
58 pytestCheckHook
59 rangehttpserver
60 scikit-hep-testdata
61 writableTmpDirAsHomeHook
62 ];
63
64 disabledTests = [
65 # Tests that try to download files
66 "test_descend_into_path_classname_of"
67 "test_fallback"
68 "test_fsspec_cache_http"
69 "test_fsspec_cache_http_directory"
70 "test_fsspec_chunks"
71 "test_fsspec_globbing_http"
72 "test_http"
73 "test_http_fallback_workers"
74 "test_http_multipart"
75 "test_http_port"
76 "test_http_size"
77 "test_http_size_port"
78 "test_http_workers"
79 "test_issue176"
80 "test_issue176_again"
81 "test_issue_1054_filename_colons"
82 "test_no_multipart"
83 "test_open_fsspec_github"
84 "test_open_fsspec_http"
85 "test_pickle_roundtrip_http"
86
87 # Cyclic dependency with dask-awkward
88 "test_dask_duplicated_keys"
89 "test_decompression_executor_for_dask"
90 "test_decompression_threadpool_executor_for_dask"
91 ];
92
93 disabledTestPaths = [
94 # Tests that try to download files
95 "tests/test_0066_fix_http_fallback_freeze.py"
96 "tests/test_0220_contiguous_byte_ranges_in_http.py"
97 ];
98
99 __darwinAllowLocalNetworking = true;
100
101 pythonImportsCheck = [ "uproot" ];
102
103 meta = {
104 description = "ROOT I/O in pure Python and Numpy";
105 homepage = "https://github.com/scikit-hep/uproot5";
106 changelog = "https://github.com/scikit-hep/uproot5/releases/tag/v${version}";
107 license = lib.licenses.bsd3;
108 maintainers = with lib.maintainers; [ veprbl ];
109 };
110}