anki-bin: 24.06.3 -> 24.11 (#360722)
[NixPkgs.git] / pkgs / development / python-modules / pyqt5-stubs / default.nix
bloba891942d1d4578e7e109f63fe6917ced21576975
2   lib,
3   buildPythonPackage,
4   fetchFromGitHub,
5   pythonOlder,
6   pytestCheckHook,
7   pyqt5,
8   pyqt3d,
9   pyqtchart,
10   pyqtdatavisualization,
11   pyqtwebengine,
14 buildPythonPackage rec {
15   pname = "pyqt5-stubs";
16   version = "5.15.6.0";
17   format = "setuptools";
18   disabled = pythonOlder "3.7";
20   src = fetchFromGitHub {
21     owner = "python-qt-tools";
22     repo = "PyQt5-stubs";
23     rev = version;
24     hash = "sha256-qWnvlHnFRy8wbZJ28C0pYqAxod623Epe5z5FZufheDc=";
25   };
26   postPatch =
27     ''
28       # pulls in a dependency to mypy, but we don't want to run linters
29       rm tests/test_stubs.py
30     ''
31     + lib.optionalString (!pyqt5.connectivityEnabled) ''
32       rm tests/qflags/test_QtBluetooth_*
33       rm tests/qflags/test_QtNfc_*
34     ''
35     + lib.optionalString (!pyqt5.locationEnabled) ''
36       rm tests/qflags/test_QtLocation_*
37       rm tests/qflags/test_QtPositioning_*
38     ''
39     + lib.optionalString (!pyqt5.multimediaEnabled) ''
40       rm tests/qflags/test_QtMultimedia_*
41     ''
42     + lib.optionalString (!pyqt5.serialPortEnabled) ''
43       rm tests/qflags/test_QtSerialPort_*
44     ''
45     + lib.optionalString (!pyqt5.toolsEnabled) ''
46       rm tests/qflags/test_QtDesigner_*
47     '';
49   pythonImportsCheck = [ "PyQt5-stubs" ];
51   nativeCheckInputs = [
52     pytestCheckHook
53     pyqt5
54     pyqt3d
55     pyqtchart
56     pyqtdatavisualization
57     pyqtwebengine
58   ];
60   meta = with lib; {
61     description = "Stubs for PyQt5";
62     homepage = "https://github.com/python-qt-tools/PyQt5-stubs";
63     license = licenses.gpl3;
64     maintainers = with maintainers; [ _999eagle ];
65   };