2022-05-18 14:49:53 +00:00
|
|
|
{ lib, buildPythonPackage, fetchPypi, numpy, pytest, pyyaml }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "spglib";
|
2022-11-21 17:40:18 +00:00
|
|
|
version = "2.0.2";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2023-03-15 16:39:30 +00:00
|
|
|
hash = "sha256-HQgewi2kq0/DGY6URd2tbewiYcQ5J4MRUdk+OUImEKo=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [ numpy ];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [ pytest pyyaml ];
|
2022-05-18 14:49:53 +00:00
|
|
|
|
|
|
|
# pytestCheckHook doesn't work
|
|
|
|
# ImportError: cannot import name '_spglib' from partially initialized module 'spglib'
|
|
|
|
checkPhase = ''
|
|
|
|
pytest
|
|
|
|
'';
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "spglib" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Python bindings for C library for finding and handling crystal symmetries";
|
2022-05-18 14:49:53 +00:00
|
|
|
homepage = "https://spglib.github.io/spglib/";
|
|
|
|
changelog = "https://github.com/spglib/spglib/raw/v${version}/ChangeLog";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ psyanticy ];
|
|
|
|
};
|
|
|
|
}
|