1{ lib, buildPythonPackage, fetchPypi, numpy, pytest, pyyaml }:
2
3buildPythonPackage rec {
4 pname = "spglib";
5 version = "2.0.2";
6
7 src = fetchPypi {
8 inherit pname version;
9 sha256 = "sha256-HQgewi2kq0/DGY6URd2tbewiYcQ5J4MRUdk+OUImEKo=";
10 };
11
12 propagatedBuildInputs = [ numpy ];
13
14 checkInputs = [ pytest pyyaml ];
15
16 # pytestCheckHook doesn't work
17 # ImportError: cannot import name '_spglib' from partially initialized module 'spglib'
18 checkPhase = ''
19 pytest
20 '';
21
22 pythonImportsCheck = [ "spglib" ];
23
24 meta = with lib; {
25 description = "Python bindings for C library for finding and handling crystal symmetries";
26 homepage = "https://spglib.github.io/spglib/";
27 changelog = "https://github.com/spglib/spglib/raw/v${version}/ChangeLog";
28 license = licenses.bsd3;
29 maintainers = with maintainers; [ psyanticy ];
30 };
31}