2021-06-04 09:07:49 +00:00
|
|
|
{ lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pythonAtLeast
|
|
|
|
, buildPythonPackage
|
|
|
|
, importlib-resources
|
|
|
|
, pyyaml
|
|
|
|
, requests
|
|
|
|
, setuptools-scm
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "scikit-hep-testdata";
|
2022-09-22 12:36:57 +00:00
|
|
|
version = "0.4.21";
|
2021-06-04 09:07:49 +00:00
|
|
|
format = "pyproject";
|
|
|
|
|
|
|
|
# fetch from github as we want the data files
|
|
|
|
# https://github.com/scikit-hep/scikit-hep-testdata/issues/60
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "scikit-hep";
|
|
|
|
repo = pname;
|
2022-08-12 12:06:08 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2022-09-22 12:36:57 +00:00
|
|
|
sha256 = "sha256-DhOtoxjhczsYqOn+CwLGlRIPa2hh7mH6EfwcLLPMQcw=";
|
2021-06-04 09:07:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools-scm
|
|
|
|
];
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
pyyaml
|
|
|
|
requests
|
|
|
|
] ++ lib.optional (!pythonAtLeast "3.9") importlib-resources;
|
|
|
|
|
|
|
|
SETUPTOOLS_SCM_PRETEND_VERSION = version;
|
|
|
|
|
|
|
|
SKHEP_DATA = 1; # install the actual root files
|
|
|
|
|
|
|
|
doCheck = false; # tests require networking
|
|
|
|
pythonImportsCheck = [ "skhep_testdata" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://github.com/scikit-hep/scikit-hep-testdata";
|
|
|
|
description = "A common package to provide example files (e.g., ROOT) for testing and developing packages against";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ veprbl ];
|
|
|
|
};
|
|
|
|
}
|