1{
2 lib,
3 buildPythonPackage,
4 cython,
5 fetchFromGitHub,
6 libstatgrab,
7 pkg-config,
8 pythonOlder,
9 setuptools,
10 unittestCheckHook,
11 wheel,
12}:
13
14buildPythonPackage rec {
15 pname = "pystatgrab";
16 version = "0.7.2";
17 pyproject = true;
18
19 disabled = pythonOlder "3.7";
20
21 src = fetchFromGitHub {
22 owner = "libstatgrab";
23 repo = "pystatgrab";
24 rev = "PYSTATGRAB_${lib.replaceStrings [ "." ] [ "_" ] version}";
25 hash = "sha256-0FDhkIK8jy3/SFmCzrl9l4RTeIKDjO0o5UoODx6Wnfs=";
26 };
27
28 build-system = [
29 setuptools
30 wheel
31 ];
32
33 nativeBuildInputs = [
34 cython
35 pkg-config
36 ];
37
38 buildInputs = [
39 libstatgrab
40 ];
41
42 nativeCheckInputs = [ unittestCheckHook ];
43
44 pythonImportsCheck = [ "statgrab" ];
45
46 meta = with lib; {
47 description = "Python bindings for libstatgrab";
48 homepage = "https://github.com/libstatgrab/pystatgrab";
49 changelog = "https://github.com/libstatgrab/pystatgrab/blob/PYSTATGRAB_${
50 lib.replaceStrings [ "." ] [ "_" ] version
51 }/NEWS";
52 license = licenses.lgpl21Only;
53 maintainers = with maintainers; [ fab ];
54 };
55}