1 |
commit: 1d14f1c12251ca25b8ed0ee53e141406b5f5e67f |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue May 18 07:30:00 2021 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue May 18 08:50:43 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1d14f1c1 |
7 |
|
8 |
dev-python/QtPy: Backport some improvements from removed -r3 |
9 |
|
10 |
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> |
11 |
|
12 |
dev-python/QtPy/QtPy-1.9.0-r2.ebuild | 22 +++++++++++++++++++--- |
13 |
1 file changed, 19 insertions(+), 3 deletions(-) |
14 |
|
15 |
diff --git a/dev-python/QtPy/QtPy-1.9.0-r2.ebuild b/dev-python/QtPy/QtPy-1.9.0-r2.ebuild |
16 |
index 32222ef6ef4..33c8ccc6869 100644 |
17 |
--- a/dev-python/QtPy/QtPy-1.9.0-r2.ebuild |
18 |
+++ b/dev-python/QtPy/QtPy-1.9.0-r2.ebuild |
19 |
@@ -1,13 +1,13 @@ |
20 |
-# Copyright 1999-2020 Gentoo Authors |
21 |
+# Copyright 1999-2021 Gentoo Authors |
22 |
# Distributed under the terms of the GNU General Public License v2 |
23 |
|
24 |
EAPI=7 |
25 |
|
26 |
PYTHON_COMPAT=( python3_{7..9} ) |
27 |
|
28 |
-inherit distutils-r1 |
29 |
+inherit distutils-r1 virtualx |
30 |
|
31 |
-DESCRIPTION="Abstraction layer for PyQt5/PySide" |
32 |
+DESCRIPTION="Abstraction layer on top of PyQt5 and PySide2 and additional custom QWidgets" |
33 |
HOMEPAGE="https://github.com/spyder-ide/qtpy" |
34 |
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" |
35 |
|
36 |
@@ -16,11 +16,22 @@ SLOT="0" |
37 |
KEYWORDS="amd64 arm64 x86" |
38 |
IUSE="designer gui opengl printsupport svg testlib webengine" |
39 |
|
40 |
+# WARNING: the obvious solution of using || for PyQt5/pyside2 is not going |
41 |
+# to work. The package only checks whether PyQt5/pyside2 is installed, it does |
42 |
+# not verify whether they have the necessary modules (i.e. satisfy the USE dep). |
43 |
RDEPEND=" |
44 |
dev-python/PyQt5[${PYTHON_USEDEP},designer?,opengl?,printsupport?,svg?] |
45 |
gui? ( dev-python/PyQt5[${PYTHON_USEDEP},gui,widgets] ) |
46 |
testlib? ( dev-python/PyQt5[${PYTHON_USEDEP},testlib] ) |
47 |
webengine? ( dev-python/PyQtWebEngine[${PYTHON_USEDEP}] )" |
48 |
+# The QtPy testsuite skips tests for bindings that are |
49 |
+# not installed, so here we ensure that everything |
50 |
+# is available and all tests are run. |
51 |
+BDEPEND=" |
52 |
+ test? ( |
53 |
+ dev-python/PyQt5[${PYTHON_USEDEP},bluetooth,dbus,declarative,designer,gui,help,location,multimedia,network,networkauth,opengl,positioning,printsupport,sensors,serialport,sql,ssl,svg,testlib,webchannel,webkit,websockets,widgets,x11extras,xml(+),xmlpatterns] |
54 |
+ dev-python/PyQtWebEngine[${PYTHON_USEDEP}] |
55 |
+ )" |
56 |
|
57 |
src_prepare() { |
58 |
default |
59 |
@@ -29,3 +40,8 @@ src_prepare() { |
60 |
sed -i -e "s/from PySide import/raise ImportError #/" qtpy/__init__.py || die |
61 |
sed -i -e "s/from PySide2 import/raise ImportError #/" qtpy/__init__.py || die |
62 |
} |
63 |
+ |
64 |
+python_test() { |
65 |
+ local -x QT_API="pyqt5" |
66 |
+ virtx pytest -vv |
67 |
+} |