1{ lib, buildPythonPackage, pythonOlder, fetchFromGitHub, cython, pytest, importlib-resources, numpy }:
2
3buildPythonPackage rec {
4 pname = "pyjet";
5 version = "1.9.0";
6
7 # tests not included in pypi tarball
8 src = fetchFromGitHub {
9 owner = "scikit-hep";
10 repo = pname;
11 rev = "refs/tags/${version}";
12 hash = "sha256-0g0fCf0FIwde5Vsc/BJxjgMcs5llpD8JqOgFbMjOooc=";
13 };
14
15 nativeBuildInputs = [ cython ];
16 propagatedBuildInputs = [
17 numpy
18 ] ++ lib.optionals (pythonOlder "3.9") [
19 importlib-resources
20 ];
21
22 nativeCheckInputs = [ pytest ];
23 checkPhase = ''
24 mv pyjet _pyjet
25 pytest tests/
26 '';
27
28 meta = with lib; {
29 homepage = "https://github.com/scikit-hep/pyjet";
30 description = "The interface between FastJet and NumPy";
31 license = licenses.gpl2Plus;
32 maintainers = with maintainers; [ veprbl ];
33 };
34}