2021-06-04 09:07:49 +00:00
|
|
|
{ lib
|
2022-10-21 18:38:19 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
2022-12-17 10:02:37 +00:00
|
|
|
, pythonOlder
|
|
|
|
, awkward
|
|
|
|
, hatchling
|
2022-10-21 18:38:19 +00:00
|
|
|
, importlib-metadata
|
|
|
|
, numpy
|
|
|
|
, packaging
|
2021-06-04 09:07:49 +00:00
|
|
|
, pytestCheckHook
|
2022-12-17 10:02:37 +00:00
|
|
|
, lz4
|
|
|
|
, pytest-timeout
|
2021-06-04 09:07:49 +00:00
|
|
|
, scikit-hep-testdata
|
2022-10-21 18:38:19 +00:00
|
|
|
, xxhash
|
|
|
|
, zstandard
|
2021-06-04 09:07:49 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "uproot";
|
2022-12-17 10:02:37 +00:00
|
|
|
version = "5.0.0";
|
|
|
|
format = "pyproject";
|
2022-10-21 18:38:19 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2021-06-04 09:07:49 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "scikit-hep";
|
2022-12-17 10:02:37 +00:00
|
|
|
repo = "uproot5";
|
2022-09-11 15:47:08 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2022-12-17 10:02:37 +00:00
|
|
|
hash = "sha256-3i6AUQKKWu5KOtfLdLK2LpgkHyiqG30Eiyy6OH4fjUY=";
|
2021-06-04 09:07:49 +00:00
|
|
|
};
|
|
|
|
|
2022-12-17 10:02:37 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
hatchling
|
|
|
|
];
|
|
|
|
|
2021-06-04 09:07:49 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
awkward
|
|
|
|
numpy
|
2022-10-21 18:38:19 +00:00
|
|
|
packaging
|
|
|
|
] ++ lib.optionals (pythonOlder "3.8") [
|
|
|
|
importlib-metadata
|
2021-06-04 09:07:49 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
pytestCheckHook
|
2022-12-17 10:02:37 +00:00
|
|
|
lz4
|
|
|
|
pytest-timeout
|
2021-06-04 09:07:49 +00:00
|
|
|
scikit-hep-testdata
|
2022-12-17 10:02:37 +00:00
|
|
|
xxhash
|
|
|
|
zstandard
|
2021-06-04 09:07:49 +00:00
|
|
|
];
|
2022-10-21 18:38:19 +00:00
|
|
|
|
2021-06-04 09:07:49 +00:00
|
|
|
preCheck = ''
|
|
|
|
export HOME="$(mktemp -d)"
|
|
|
|
'';
|
2022-10-21 18:38:19 +00:00
|
|
|
|
2021-06-04 09:07:49 +00:00
|
|
|
disabledTests = [
|
2022-10-21 18:38:19 +00:00
|
|
|
# Tests that try to download files
|
2021-06-04 09:07:49 +00:00
|
|
|
"test_http"
|
|
|
|
"test_no_multipart"
|
|
|
|
"test_fallback"
|
|
|
|
"test_pickle_roundtrip_http"
|
|
|
|
];
|
2022-10-21 18:38:19 +00:00
|
|
|
|
2021-06-04 09:07:49 +00:00
|
|
|
disabledTestPaths = [
|
2022-10-21 18:38:19 +00:00
|
|
|
# Tests that try to download files
|
2021-06-04 09:07:49 +00:00
|
|
|
"tests/test_0066-fix-http-fallback-freeze.py"
|
|
|
|
"tests/test_0088-read-with-http.py"
|
|
|
|
"tests/test_0220-contiguous-byte-ranges-in-http.py"
|
|
|
|
];
|
2022-10-21 18:38:19 +00:00
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"uproot"
|
|
|
|
];
|
2021-06-04 09:07:49 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "ROOT I/O in pure Python and Numpy";
|
2022-10-21 18:38:19 +00:00
|
|
|
homepage = "https://github.com/scikit-hep/uproot5";
|
|
|
|
changelog = "https://github.com/scikit-hep/uproot5/releases/tag/v${version}";
|
2021-06-04 09:07:49 +00:00
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ veprbl ];
|
|
|
|
};
|
|
|
|
}
|