From a9ea7b296f8df662307dc560dd410c1ba7cdb14c Mon Sep 17 00:00:00 2001 From: natsukium Date: Sun, 3 Nov 2024 12:04:46 +0900 Subject: [PATCH] python312Packages.seekpath: refactor --- .../python-modules/seekpath/default.nix | 32 +++++++++---------- 1 file changed, 15 insertions(+), 17 deletions(-) diff --git a/pkgs/development/python-modules/seekpath/default.nix b/pkgs/development/python-modules/seekpath/default.nix index 80df63a1bd42..257955ed8d5c 100644 --- a/pkgs/development/python-modules/seekpath/default.nix +++ b/pkgs/development/python-modules/seekpath/default.nix @@ -2,46 +2,44 @@ lib, buildPythonPackage, fetchFromGitHub, - pythonOlder, + setuptools, numpy, - future, + scipy, spglib, glibcLocales, - pytest, - scipy, + pytestCheckHook, }: buildPythonPackage rec { pname = "seekpath"; version = "2.1.0"; - format = "setuptools"; - disabled = pythonOlder "3.5"; + pyproject = true; src = fetchFromGitHub { owner = "giovannipizzi"; - repo = pname; + repo = "seekpath"; rev = "v${version}"; - sha256 = "sha256-8Nm8SKHda2qt1kncXZxC4T3cpicXpDZhxPzs78JICzE="; + hash = "sha256-8Nm8SKHda2qt1kncXZxC4T3cpicXpDZhxPzs78JICzE="; }; LC_ALL = "en_US.utf-8"; - # scipy isn't listed in install_requires, but used in package - propagatedBuildInputs = [ + build-system = [ setuptools ]; + + dependencies = [ numpy spglib - future - scipy ]; + optional-dependencies = { + bz = [ scipy ]; + }; + nativeBuildInputs = [ glibcLocales ]; - nativeCheckInputs = [ pytest ]; + pythonImportsCheck = [ "seekpath" ]; - # I don't know enough about crystal structures to fix - checkPhase = '' - pytest . -k 'not oI2Y' - ''; + nativeCheckInputs = [ pytestCheckHook ] ++ optional-dependencies.bz; meta = with lib; { description = "Module to obtain and visualize band paths in the Brillouin zone of crystal structures";