2021-12-06 16:07:01 +00:00
|
|
|
{ lib, buildPythonPackage, pythonOlder, fetchFromGitHub, cython, pytest, importlib-resources, numpy }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pyjet";
|
2021-10-28 06:52:43 +00:00
|
|
|
version = "1.8.2";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-09-25 04:45:31 +00:00
|
|
|
# tests not included in pypi tarball
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "scikit-hep";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2021-10-28 06:52:43 +00:00
|
|
|
sha256 = "sha256-0EI/dbanVDvILawnnK/Ce/5n/cD4Fv7VQEZfF9yPQio=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ cython ];
|
2021-12-06 16:07:01 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
numpy
|
|
|
|
] ++ lib.optionals (pythonOlder "3.9") [
|
|
|
|
importlib-resources
|
|
|
|
];
|
2021-10-28 06:52:43 +00:00
|
|
|
|
2020-09-25 04:45:31 +00:00
|
|
|
checkInputs = [ pytest ];
|
|
|
|
checkPhase = ''
|
|
|
|
mv pyjet _pyjet
|
|
|
|
pytest tests/
|
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://github.com/scikit-hep/pyjet";
|
|
|
|
description = "The interface between FastJet and NumPy";
|
2021-10-28 06:52:43 +00:00
|
|
|
license = licenses.gpl2Plus;
|
2020-04-24 23:36:52 +00:00
|
|
|
maintainers = with maintainers; [ veprbl ];
|
|
|
|
};
|
|
|
|
}
|