1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, pythonOlder
5, awkward
6, hatchling
7, numpy
8, packaging
9, pytestCheckHook
10, lz4
11, pytest-timeout
12, scikit-hep-testdata
13, xxhash
14, zstandard
15}:
16
17buildPythonPackage rec {
18 pname = "uproot";
19 version = "5.1.2";
20 pyproject = true;
21
22 disabled = pythonOlder "3.8";
23
24 src = fetchFromGitHub {
25 owner = "scikit-hep";
26 repo = "uproot5";
27 rev = "refs/tags/v${version}";
28 hash = "sha256-TMa+j2jdFagJJhlyCx4rNLaxQhrJyq1HdpnA40xiyME=";
29 };
30
31 nativeBuildInputs = [
32 hatchling
33 ];
34
35 propagatedBuildInputs = [
36 awkward
37 numpy
38 packaging
39 ];
40
41 nativeCheckInputs = [
42 pytestCheckHook
43 lz4
44 pytest-timeout
45 scikit-hep-testdata
46 xxhash
47 zstandard
48 ];
49
50 preCheck = ''
51 export HOME="$(mktemp -d)"
52 '';
53
54 disabledTests = [
55 # Tests that try to download files
56 "test_http"
57 "test_no_multipart"
58 "test_fallback"
59 "test_pickle_roundtrip_http"
60 "test_open_fsspec_local"
61 ];
62
63 disabledTestPaths = [
64 # Tests that try to download files
65 "tests/test_0066-fix-http-fallback-freeze.py"
66 "tests/test_0088-read-with-http.py"
67 "tests/test_0220-contiguous-byte-ranges-in-http.py"
68 "tests/test_0916-read-from-s3.py"
69 "tests/test_0930-expressions-in-pandas.py"
70 ];
71
72 pythonImportsCheck = [
73 "uproot"
74 ];
75
76 meta = with lib; {
77 description = "ROOT I/O in pure Python and Numpy";
78 homepage = "https://github.com/scikit-hep/uproot5";
79 changelog = "https://github.com/scikit-hep/uproot5/releases/tag/v${version}";
80 license = licenses.bsd3;
81 maintainers = with maintainers; [ veprbl ];
82 };
83}