about summary refs log tree commit diff
diff options
context:
space:
mode:
authorFabian Affolter <fabian@affolter-engineering.ch>2023-01-25 01:07:59 +0100
committerGitHub <noreply@github.com>2023-01-25 01:07:59 +0100
commit5b0130945a3105b31a9209a2656f2b9d5e0c23a4 (patch)
tree6f8b7877f7cbfd9e35e19c46ddfdee074231884e
parenta4232ece820bcfe56650451a124561d2d86370dd (diff)
parentd737af5de8759fc835e54b339bed703cb1198856 (diff)
Merge pull request #212463 from fabaff/particle-fix
python310Packages.particle: 0.21.0 -> 0.21.1
-rw-r--r--pkgs/development/python-modules/particle/default.nix58
1 files changed, 34 insertions, 24 deletions
diff --git a/pkgs/development/python-modules/particle/default.nix b/pkgs/development/python-modules/particle/default.nix
index 1564a4c21761d..aaa62ada8ba33 100644
--- a/pkgs/development/python-modules/particle/default.nix
+++ b/pkgs/development/python-modules/particle/default.nix
@@ -1,56 +1,66 @@
 { lib
+, attrs
 , buildPythonPackage
 , fetchFromGitHub
 , fetchPypi
-, setuptools-scm
-, attrs
-, deprecated
+, hatch-vcs
+, hatchling
 , hepunits
+, pandas
 , pytestCheckHook
+, pythonOlder
+, setuptools-scm
 , tabulate
-, pandas
 }:
 
 buildPythonPackage rec {
   pname = "particle";
-  version = "0.21.0";
+  version = "0.21.1";
+  format = "pyproject";
+
+  disabled = pythonOlder "3.9";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "sha256-SDdIg05+gfLNaQ+glitTf3Z/6K9HBci62mjIu9rIoX0=";
+    hash = "sha256-Mw9IVQoXZU8ByU6OI2Wtmo3PJuVz6KzzH7I+pPYkssQ=";
   };
+
+  postPatch = ''
+    # Disable benchmark tests, so we won't need pytest-benchmark and pytest-cov
+    # as dependencies
+    substituteInPlace pyproject.toml \
+      --replace '"--benchmark-disable",' ""
+  '';
+
   nativeBuildInputs = [
-    setuptools-scm
+    hatch-vcs
+    hatchling
   ];
 
   propagatedBuildInputs = [
     attrs
-    deprecated
     hepunits
   ];
 
-  pythonImportsCheck = [
-    "particle"
-  ];
-
-  preCheck = ''
-    # Disable benchmark tests, so we won't need pytest-benchmark and pytest-cov
-    # as dependencies
-    substituteInPlace pyproject.toml \
-      --replace '"--benchmark-disable", ' ""
-    rm tests/particle/test_performance.py
-  '';
-
   nativeCheckInputs = [
     pytestCheckHook
     tabulate
     pandas
   ];
 
-  meta = {
-    description = "Package to deal with particles, the PDG particle data table, PDGIDs, etc.";
+  pythonImportsCheck = [
+    "particle"
+  ];
+
+  disabledTestPaths = [
+    "tests/particle/test_performance.py"
+  ];
+
+  meta = with lib; {
+    description = "Package to deal with particles, the PDG particle data table and others";
     homepage = "https://github.com/scikit-hep/particle";
-    license = lib.licenses.bsd3;
-    maintainers = with lib.maintainers; [ doronbehar ];
+    changelog = "https://github.com/scikit-hep/particle/releases/tag/v${version}";
+    license = licenses.bsd3;
+    maintainers = with maintainers; [ doronbehar ];
   };
 }