From 4f96879c9d8bebd35ddc1a78886d6a4da55fb015 Mon Sep 17 00:00:00 2001 From: natsukium Date: Fri, 10 Jan 2025 23:03:43 +0900 Subject: [PATCH] python312Packages.periodictable: refactor --- .../python-modules/periodictable/default.nix | 21 ++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/pkgs/development/python-modules/periodictable/default.nix b/pkgs/development/python-modules/periodictable/default.nix index 5e6c229c2f7b..1bde32797813 100644 --- a/pkgs/development/python-modules/periodictable/default.nix +++ b/pkgs/development/python-modules/periodictable/default.nix @@ -2,8 +2,10 @@ lib, fetchFromGitHub, buildPythonPackage, + setuptools, numpy, pyparsing, + pytest-cov-stub, pytestCheckHook, pythonOlder, }: @@ -11,9 +13,9 @@ buildPythonPackage rec { pname = "periodictable"; version = "2.0.2"; - format = "setuptools"; + pyproject = true; - disabled = pythonOlder "3.7"; + disabled = pythonOlder "3.8"; src = fetchFromGitHub { owner = "python-periodictable"; @@ -22,19 +24,24 @@ buildPythonPackage rec { hash = "sha256-nI6hiLnqmVXT06pPkHCBEMTxZhfnZJqSImW3V9mJ4+8="; }; - propagatedBuildInputs = [ + build-system = [ setuptools ]; + + dependencies = [ numpy pyparsing ]; - nativeCheckInputs = [ pytestCheckHook ]; + nativeCheckInputs = [ + pytest-cov-stub + pytestCheckHook + ]; pythonImportsCheck = [ "periodictable" ]; - meta = with lib; { + meta = { description = "Extensible periodic table of the elements"; homepage = "https://github.com/pkienzle/periodictable"; - license = licenses.publicDomain; - maintainers = with maintainers; [ rprospero ]; + license = lib.licenses.publicDomain; + maintainers = with lib.maintainers; [ rprospero ]; }; }