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