python312Packages.seekpath: refactor

This commit is contained in:
natsukium
2024-11-03 12:04:46 +09:00
parent ce691f536f
commit a9ea7b296f
@@ -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";