1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 pythonOlder,
6 setuptools,
7 setuptools-scm,
8 packaging,
9 tomli,
10
11 # tests
12 poppler-qt5,
13 qgis,
14 qgis-ltr,
15}:
16
17buildPythonPackage rec {
18 pname = "sip";
19 version = "6.10.0";
20 pyproject = true;
21
22 src = fetchPypi {
23 inherit pname version;
24 hash = "sha256-+gUVaX1MmNvgTZ6JjYFt4UJ+W5rl0OFSFpEJ/SH10pw=";
25 };
26
27 patches = [
28 # Make wheel file generation deterministic https://github.com/NixOS/nixpkgs/issues/383885
29 ./sip-builder.patch
30 ];
31
32 build-system = [
33 setuptools
34 setuptools-scm
35 ];
36
37 dependencies = [
38 packaging
39 setuptools
40 ] ++ lib.optionals (pythonOlder "3.11") [ tomli ];
41
42 # There aren't tests
43 doCheck = false;
44
45 pythonImportsCheck = [ "sipbuild" ];
46
47 passthru.tests = {
48 # test depending packages
49 inherit poppler-qt5 qgis qgis-ltr;
50 };
51
52 meta = with lib; {
53 description = "Creates C++ bindings for Python modules";
54 homepage = "https://riverbankcomputing.com/";
55 license = licenses.gpl3Only;
56 maintainers = with maintainers; [ ];
57 };
58}