depot/third_party/nixpkgs/pkgs/development/python-modules/scikit-hep-testdata/default.nix
Default email 7bc014aa9c Project import generated by Copybara.
GitOrigin-RevId: c97e777ff06fcb8d37dcdf5e21e9eff1f34f0e90
2022-09-11 12:47:08 -03:00

46 lines
1.1 KiB
Nix

{ lib
, fetchFromGitHub
, pythonAtLeast
, buildPythonPackage
, importlib-resources
, pyyaml
, requests
, setuptools-scm
}:
buildPythonPackage rec {
pname = "scikit-hep-testdata";
version = "0.4.20";
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;
rev = "refs/tags/v${version}";
sha256 = "sha256-xUXHacUIOr309HCHpzFw0g4i0bgiYcvYTCwBBbVVlR0=";
};
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 ];
};
}