1{ lib
2, attrs
3, buildPythonPackage
4, deprecated
5, fetchFromGitHub
6, fetchPypi
7, hatch-vcs
8, hatchling
9, hepunits
10, pandas
11, pytestCheckHook
12, pythonOlder
13, setuptools-scm
14, tabulate
15}:
16
17buildPythonPackage rec {
18 pname = "particle";
19 version = "0.23.0";
20 format = "pyproject";
21
22 disabled = pythonOlder "3.9";
23
24 src = fetchPypi {
25 inherit pname version;
26 hash = "sha256-2BD4/CfeuOf9ZBdAF9lgfVBSIknAlzoACOWA+T2xF1A=";
27 };
28
29 postPatch = ''
30 # Disable benchmark tests, so we won't need pytest-benchmark and pytest-cov
31 # as dependencies
32 substituteInPlace pyproject.toml \
33 --replace '"--benchmark-disable",' ""
34 '';
35
36 nativeBuildInputs = [
37 hatch-vcs
38 hatchling
39 ];
40
41 propagatedBuildInputs = [
42 attrs
43 deprecated
44 hepunits
45 ];
46
47 nativeCheckInputs = [
48 pytestCheckHook
49 tabulate
50 pandas
51 ];
52
53 pythonImportsCheck = [
54 "particle"
55 ];
56
57 disabledTestPaths = [
58 "tests/particle/test_performance.py"
59 ];
60
61 meta = with lib; {
62 description = "Package to deal with particles, the PDG particle data table and others";
63 homepage = "https://github.com/scikit-hep/particle";
64 changelog = "https://github.com/scikit-hep/particle/releases/tag/v${version}";
65 license = licenses.bsd3;
66 maintainers = with maintainers; [ doronbehar ];
67 };
68}