1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 pythonOlder,
6
7 # propagates
8 packaging,
9
10 # tests
11 pyqt5,
12 pyside2,
13 pytestCheckHook,
14}:
15
16buildPythonPackage rec {
17 pname = "qtpy";
18 version = "2.4.3";
19 format = "setuptools";
20
21 disabled = pythonOlder "3.7";
22
23 src = fetchPypi {
24 inherit pname version;
25 hash = "sha256-23RPeDLm09qQVoumzLyj7is7SokMPW+7xjFC9uTN9bs=";
26 };
27
28 propagatedBuildInputs = [ packaging ];
29
30 doCheck = false; # ModuleNotFoundError: No module named 'PyQt5.QtConnectivity'
31 nativeCheckInputs = [
32 pyside2
33 (pyqt5.override {
34 withConnectivity = true;
35 withMultimedia = true;
36 withWebKit = true;
37 withWebSockets = true;
38 })
39 pytestCheckHook
40 ];
41
42 disabledTestPaths = [
43 # Fatal error in python on x86_64
44 "qtpy/tests/test_uic.py"
45 ];
46
47 meta = with lib; {
48 description = "Abstraction layer for PyQt5/PyQt6/PySide2/PySide6";
49 mainProgram = "qtpy";
50 homepage = "https://github.com/spyder-ide/qtpy";
51 license = licenses.mit;
52 };
53}