1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5
6 # build-system
7 setuptools-scm,
8
9 # dependencies
10 pyyaml,
11 requests,
12 pythonAtLeast,
13 importlib-resources,
14}:
15
16buildPythonPackage rec {
17 pname = "scikit-hep-testdata";
18 version = "0.5.4";
19 pyproject = true;
20
21 src = fetchFromGitHub {
22 owner = "scikit-hep";
23 repo = "scikit-hep-testdata";
24 tag = "v${version}";
25 hash = "sha256-LDOBd+0Aw/x9qW30Tb0B9AlhckOkJhY+Mx4ERkvDbJc=";
26 };
27
28 build-system = [ setuptools-scm ];
29
30 dependencies = [
31 pyyaml
32 requests
33 ] ++ lib.optionals (!pythonAtLeast "3.9") [ importlib-resources ];
34
35 SKHEP_DATA = 1; # install the actual root files
36
37 doCheck = false; # tests require networking
38
39 pythonImportsCheck = [ "skhep_testdata" ];
40
41 meta = {
42 homepage = "https://github.com/scikit-hep/scikit-hep-testdata";
43 description = "Common package to provide example files (e.g., ROOT) for testing and developing packages against";
44 changelog = "https://github.com/scikit-hep/scikit-hep-testdata/releases/tag/${src.tag}";
45 license = lib.licenses.bsd3;
46 maintainers = with lib.maintainers; [ veprbl ];
47 };
48}