2020-09-10 21:16:39 +01:00
|
|
|
{ lib, buildPythonPackage, fetchFromGitHub, cython, pytest, numpy }:
|
2018-09-23 21:40:29 +01:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pyjet";
|
2020-06-06 07:47:24 +01:00
|
|
|
version = "1.6.0";
|
2018-09-23 21:40:29 +01:00
|
|
|
|
2020-09-10 21:16:39 +01:00
|
|
|
# tests not included in pypi tarball
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "scikit-hep";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
|
|
|
sha256 = "0b68jnbfk2rw9i1nnwsrbrbgkj7r0w1nw0i9f8fah1wmn78k9csv";
|
2018-09-23 21:40:29 +01:00
|
|
|
};
|
|
|
|
|
2018-12-10 18:31:47 +00:00
|
|
|
# fix for python37
|
|
|
|
# https://github.com/scikit-hep/pyjet/issues/8
|
|
|
|
nativeBuildInputs = [ cython ];
|
|
|
|
preBuild = ''
|
|
|
|
for f in pyjet/src/*.{pyx,pxd}; do
|
|
|
|
cython --cplus "$f"
|
|
|
|
done
|
|
|
|
'';
|
|
|
|
|
2018-09-23 21:40:29 +01:00
|
|
|
propagatedBuildInputs = [ numpy ];
|
2020-09-10 21:16:39 +01:00
|
|
|
checkInputs = [ pytest ];
|
|
|
|
checkPhase = ''
|
|
|
|
mv pyjet _pyjet
|
|
|
|
pytest tests/
|
|
|
|
'';
|
2018-09-23 21:40:29 +01:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://github.com/scikit-hep/pyjet";
|
|
|
|
description = "The interface between FastJet and NumPy";
|
|
|
|
license = licenses.gpl3;
|
|
|
|
maintainers = with maintainers; [ veprbl ];
|
|
|
|
};
|
|
|
|
}
|