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