1 |
commit: 0ac9243a5db485e1dc8ccd44a2aab21204056bd1 |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Nov 8 13:42:19 2022 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Nov 8 14:01:44 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0ac9243a |
7 |
|
8 |
dev-python/QtPy: Bump to 2.3.0 |
9 |
|
10 |
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> |
11 |
|
12 |
dev-python/QtPy/Manifest | 1 + |
13 |
dev-python/QtPy/QtPy-2.3.0.ebuild | 207 ++++++++++++++++++++++++++++++++++++++ |
14 |
2 files changed, 208 insertions(+) |
15 |
|
16 |
diff --git a/dev-python/QtPy/Manifest b/dev-python/QtPy/Manifest |
17 |
index cbe97f2b7ebe..da928d090655 100644 |
18 |
--- a/dev-python/QtPy/Manifest |
19 |
+++ b/dev-python/QtPy/Manifest |
20 |
@@ -1,3 +1,4 @@ |
21 |
DIST QtPy-2.1.0.tar.gz 46470 BLAKE2B 2e032d141ad134444143cd59b8952957b226d9519925083aecce82adf62eebd3f58803cf548c4142fb1ece6f0e2340043a82a7aef056f6e4a9ac8b9caf72d80d SHA512 052cab4218d23d46162d11bf038dccfe6200b05c1c8647bd1f9dcbdaa7af50c23d4ae85829e065c7bae57630d149d562d76cc78202b4f448cbf6547010c746ff |
22 |
DIST QtPy-2.2.0.tar.gz 51573 BLAKE2B 5db2be83c74fa241cbec6818fbf5b5a8ecf681fdb2813cd51b011342eb8f0f2463c0a9f251e791f6051fa3276ad1e502f7e51bf0dcd2d3192bd76d0119dc8b16 SHA512 b0e7696c7861942c16749dc5f5ccbfd038f7fc2b1defbf372885223c4100805cada9bbb2f5bdae1f1c642b52d480d6e0048e221d9efd3f3103da54e6e2bfd0ff |
23 |
DIST QtPy-2.2.1.tar.gz 52207 BLAKE2B c2fa3e7ab0bcb2fc5610bdbab57daa6e4bbbfa346f46fbba8dd9d5d9e592e4f7a2f54aa0cf7291222dca9c2db4b944abeff36513f044f86fce294b1d00261cae SHA512 9c0887880984aabcc2633ec7aa161726f295ff20c9c95db5bcd9121676e49017b8033412172b257ae29311a1d3fc42b9eb183cc48fe5d64c9a471211ec6fbc11 |
24 |
+DIST QtPy-2.3.0.tar.gz 53980 BLAKE2B 142694c3b10dc2ed46c168a063c0019928358d079dddfef0708ec8cabd782e206734bc0f680a7ee7309b483c56ecd739b3364061eaf190a1a9c9e41d940af202 SHA512 1fa3d52367fa70ca178a128f3cc95f333b1408dd88b9f9d15ef30b4c7f848a91df1626fa046667ce6bd6ee3f7a3909f1b3fb06b902eff26e1f058139eced73c6 |
25 |
|
26 |
diff --git a/dev-python/QtPy/QtPy-2.3.0.ebuild b/dev-python/QtPy/QtPy-2.3.0.ebuild |
27 |
new file mode 100644 |
28 |
index 000000000000..7eaa9a277082 |
29 |
--- /dev/null |
30 |
+++ b/dev-python/QtPy/QtPy-2.3.0.ebuild |
31 |
@@ -0,0 +1,207 @@ |
32 |
+# Copyright 1999-2022 Gentoo Authors |
33 |
+# Distributed under the terms of the GNU General Public License v2 |
34 |
+ |
35 |
+EAPI=8 |
36 |
+ |
37 |
+DISTUTILS_USE_PEP517=setuptools |
38 |
+PYTHON_COMPAT=( python3_{8..11} ) |
39 |
+ |
40 |
+inherit distutils-r1 virtualx |
41 |
+ |
42 |
+DESCRIPTION="Abstraction layer on top of PyQt and PySide with additional custom QWidgets" |
43 |
+HOMEPAGE=" |
44 |
+ https://github.com/spyder-ide/qtpy/ |
45 |
+ https://pypi.org/project/QtPy/ |
46 |
+" |
47 |
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" |
48 |
+ |
49 |
+LICENSE="MIT" |
50 |
+SLOT="0" |
51 |
+KEYWORDS="~amd64 ~arm ~arm64 ~riscv ~x86" |
52 |
+ |
53 |
+_IUSE_QT_MODULES=" |
54 |
+ designer +gui help multimedia +network opengl positioning |
55 |
+ printsupport qml quick serialport +sql svg testlib |
56 |
+ webchannel webengine websockets +widgets +xml |
57 |
+" |
58 |
+IUSE="+pyqt5 pyqt6 pyside2 pyside6 ${_IUSE_QT_MODULES}" |
59 |
+unset _IUSE_QT_MODULES |
60 |
+ |
61 |
+REQUIRED_USE="|| ( pyqt5 pyqt6 pyside2 pyside6 )" |
62 |
+ |
63 |
+# These flags are currently *not* common to the PySide2/6 and PyQt5/6 ebuilds |
64 |
+# Disable them for now, please check periodically if this is still up to date. |
65 |
+# bluetooth? ( pyqt5 only ) |
66 |
+# dbus? ( pyqt5 only ) |
67 |
+# |
68 |
+# 3d? ( pyside2 only ) |
69 |
+# charts? ( pyside2 only ) |
70 |
+# concurrent? ( pyside2 only ) |
71 |
+# datavis? ( pyside2 only ) |
72 |
+# scxml? ( pyside2 only ) |
73 |
+# script? ( pyside2 only ) |
74 |
+# scripttools? ( pyside2 only ) |
75 |
+# |
76 |
+# location? ( pyside2 and pyqt5 only ) |
77 |
+# sensors? ( pyside2 and pyqt5 only ) |
78 |
+# speech? ( pyside2 and pyqt5 only ) |
79 |
+# x11extras? ( pyside2 and pyqt5 only ) |
80 |
+# xmlpatterns? ( pyside2 and pyqt5 only ) |
81 |
+ |
82 |
+# WARNING: the obvious solution of using || for PyQt5/pyside2 is not going |
83 |
+# to work. The package only checks whether PyQt5/pyside2 is installed, it does |
84 |
+# not verify whether they have the necessary modules (i.e. satisfy the USE dep). |
85 |
+# |
86 |
+# Webengine is a special case, because PyQt5 provides this in a separate package |
87 |
+# while PySide2 ships it in the same package. |
88 |
+# |
89 |
+# declarative/qml/quick is a special case, because PyQt5 bundles the bindings |
90 |
+# for qml and quick in one flag: declarative PySide2 does not. |
91 |
+# |
92 |
+# The PyQt5 ebuild currently enables xml support unconditionally, the flag is |
93 |
+# added anyway with a (+) to make it future proof if the ebuild were to change |
94 |
+# this behaviour in the future. |
95 |
+# |
96 |
+# The PySide2 ebuild currently enables opengl and serialport support |
97 |
+# unconditionally, the flag is added anyway with a (+) to make it future proof |
98 |
+# if the ebuild were to change this behaviour in the future. |
99 |
+RDEPEND=" |
100 |
+ dev-python/packaging[${PYTHON_USEDEP}] |
101 |
+ pyqt5? ( |
102 |
+ dev-python/PyQt5[${PYTHON_USEDEP}] |
103 |
+ dev-python/PyQt5[designer?,gui?,help?,multimedia?,network?,opengl?] |
104 |
+ dev-python/PyQt5[positioning?,printsupport?,serialport?,sql?,svg?] |
105 |
+ dev-python/PyQt5[testlib?,webchannel?,websockets?,widgets?,xml(+)?] |
106 |
+ qml? ( dev-python/PyQt5[declarative] ) |
107 |
+ quick? ( dev-python/PyQt5[declarative] ) |
108 |
+ webengine? ( dev-python/PyQtWebEngine[${PYTHON_USEDEP}] ) |
109 |
+ ) |
110 |
+ pyqt6? ( |
111 |
+ dev-python/PyQt6[${PYTHON_USEDEP}] |
112 |
+ dev-python/PyQt6[designer?,gui?,help?,multimedia?,network?,opengl?] |
113 |
+ dev-python/PyQt6[positioning?,printsupport?,qml?,quick?,serialport?,sql?] |
114 |
+ dev-python/PyQt6[svg?,testlib?,webchannel?,websockets?,widgets?,xml?] |
115 |
+ webengine? ( dev-python/PyQt6-WebEngine[${PYTHON_USEDEP},widgets?,quick?] ) |
116 |
+ |
117 |
+ ) |
118 |
+ pyside2? ( |
119 |
+ dev-python/pyside2[${PYTHON_USEDEP}] |
120 |
+ dev-python/pyside2[designer?,gui?,help?,multimedia?,network?,opengl(+)?] |
121 |
+ dev-python/pyside2[positioning?,printsupport?,qml?,quick?,serialport(+)?] |
122 |
+ dev-python/pyside2[sql?,svg?,testlib?,webchannel?,webengine?,websockets?] |
123 |
+ dev-python/pyside2[widgets?,xml?] |
124 |
+ ) |
125 |
+ pyside6? ( |
126 |
+ dev-python/pyside6[${PYTHON_USEDEP}] |
127 |
+ dev-python/pyside6[designer?,gui?,help?,multimedia?,network?,opengl?] |
128 |
+ dev-python/pyside6[positioning?,printsupport?,qml?,quick?,serialport?] |
129 |
+ dev-python/pyside6[sql?,svg?,testlib?,webchannel?,webengine?,websockets?] |
130 |
+ dev-python/pyside6[widgets?,xml?] |
131 |
+ ) |
132 |
+" |
133 |
+ |
134 |
+# The QtPy testsuite skips tests for bindings that are not installed, so here we |
135 |
+# ensure that everything is available and all tests are run. Note that not |
136 |
+# all flags are available in PyQt5/PySide2, so some tests are still skipped. |
137 |
+BDEPEND=" |
138 |
+ test? ( |
139 |
+ dev-python/mock[${PYTHON_USEDEP}] |
140 |
+ pyqt5? ( |
141 |
+ dev-python/PyQt5[${PYTHON_USEDEP}] |
142 |
+ dev-python/PyQt5[bluetooth,dbus,declarative,designer,gui,help,location] |
143 |
+ dev-python/PyQt5[multimedia,network,opengl,positioning,printsupport] |
144 |
+ dev-python/PyQt5[sensors,serialport,speech(-),sql,svg,testlib,webchannel] |
145 |
+ dev-python/PyQt5[websockets,widgets,x11extras,xml(+),xmlpatterns] |
146 |
+ dev-python/PyQtWebEngine[${PYTHON_USEDEP}] |
147 |
+ ) |
148 |
+ pyqt6? ( |
149 |
+ dev-python/PyQt6[${PYTHON_USEDEP}] |
150 |
+ dev-python/PyQt6[dbus,designer,gui,help,multimedia,network,opengl] |
151 |
+ dev-python/PyQt6[positioning,printsupport,qml,quick,quick3d,serialport] |
152 |
+ dev-python/PyQt6[sql,ssl,svg,testlib,webchannel,websockets,widgets,xml] |
153 |
+ dev-python/PyQt6-WebEngine[${PYTHON_USEDEP},widgets,quick] |
154 |
+ ) |
155 |
+ pyside2? ( |
156 |
+ dev-python/pyside2[${PYTHON_USEDEP}] |
157 |
+ dev-python/pyside2[3d,charts,concurrent,datavis,designer,gui,help] |
158 |
+ dev-python/pyside2[location,multimedia,network,opengl(+),positioning] |
159 |
+ dev-python/pyside2[printsupport,qml,quick,script,scripttools,scxml] |
160 |
+ dev-python/pyside2[sensors,serialport(+),speech,sql,svg,testlib] |
161 |
+ dev-python/pyside2[webchannel,webengine,websockets,widgets,x11extras] |
162 |
+ dev-python/pyside2[xml,xmlpatterns] |
163 |
+ ) |
164 |
+ pyside6? ( |
165 |
+ dev-python/pyside6[${PYTHON_USEDEP}] |
166 |
+ dev-python/pyside6[concurrent,dbus,designer,gui,help,multimedia] |
167 |
+ dev-python/pyside6[network,opengl,positioning,printsupport,qml] |
168 |
+ dev-python/pyside6[quick,quick3d,serialport,sql,svg,testlib] |
169 |
+ dev-python/pyside6[webchannel,webengine,websockets,widgets,xml] |
170 |
+ ) |
171 |
+ ) |
172 |
+" |
173 |
+ |
174 |
+distutils_enable_tests pytest |
175 |
+ |
176 |
+src_prepare() { |
177 |
+ distutils-r1_src_prepare |
178 |
+ sed -i -e 's:--cov=qtpy --cov-report=term-missing::' pytest.ini || die |
179 |
+ # Disable Qt for Python implementations that are not selected |
180 |
+ if ! use pyqt5; then |
181 |
+ sed -i -e "s/from PyQt5.QtCore import/raise ImportError #/" qtpy/__init__.py || die |
182 |
+ fi |
183 |
+ if ! use pyqt6; then |
184 |
+ sed -i -e "s/from PyQt6.QtCore import/raise ImportError #/" qtpy/__init__.py || die |
185 |
+ fi |
186 |
+ if ! use pyside2; then |
187 |
+ sed -i -e "s/from PySide2 import/raise ImportError #/" qtpy/__init__.py || die |
188 |
+ sed -i -e "s/from PySide2.QtCore import/raise ImportError #/" qtpy/__init__.py || die |
189 |
+ fi |
190 |
+ if ! use pyside6; then |
191 |
+ sed -i -e "s/from PySide6 import/raise ImportError #/" qtpy/__init__.py || die |
192 |
+ sed -i -e "s/from PySide6.QtCore import/raise ImportError #/" qtpy/__init__.py || die |
193 |
+ fi |
194 |
+} |
195 |
+ |
196 |
+python_test() { |
197 |
+ # Test for each enabled Qt4Python target. |
198 |
+ # Deselect the other targets, their test fails if we specify QT_API |
199 |
+ # or if we have disabled their corresponding inherit in __init__.py above |
200 |
+ if use pyqt5; then |
201 |
+ einfo "Testing with ${EPYTHON} and QT_API=PyQt5" |
202 |
+ QT_API="pyqt5" virtx epytest \ |
203 |
+ --deselect qtpy/tests/test_main.py::test_qt_api_environ[PySide2] \ |
204 |
+ --deselect qtpy/tests/test_main.py::test_qt_api_environ[PyQt6] \ |
205 |
+ --deselect qtpy/tests/test_main.py::test_qt_api_environ[PySide6] |
206 |
+ fi |
207 |
+ if use pyqt6; then |
208 |
+ einfo "Testing with ${EPYTHON} and QT_API=PyQt6" |
209 |
+ QT_API="pyqt6" virtx epytest \ |
210 |
+ --deselect qtpy/tests/test_main.py::test_qt_api_environ[PySide2] \ |
211 |
+ --deselect qtpy/tests/test_main.py::test_qt_api_environ[PyQt5] \ |
212 |
+ --deselect qtpy/tests/test_main.py::test_qt_api_environ[PySide6] \ |
213 |
+ --deselect qtpy/tests/test_qtsensors.py::test_qtsensors |
214 |
+ # Qt6Sensors not yet packaged and enabled in PyQt6 ebuild |
215 |
+ fi |
216 |
+ if use pyside2; then |
217 |
+ einfo "Testing with ${EPYTHON} and QT_API=PySide2" |
218 |
+ QT_API="pyside2" virtx epytest \ |
219 |
+ --deselect qtpy/tests/test_main.py::test_qt_api_environ[PyQt5] \ |
220 |
+ --deselect qtpy/tests/test_main.py::test_qt_api_environ[PyQt6] \ |
221 |
+ --deselect qtpy/tests/test_main.py::test_qt_api_environ[PySide6] |
222 |
+ fi |
223 |
+ if use pyside6; then |
224 |
+ einfo "Testing with ${EPYTHON} and QT_API=PySide6" |
225 |
+ QT_API="pyside6" virtx epytest \ |
226 |
+ --deselect qtpy/tests/test_main.py::test_qt_api_environ[PySide2] \ |
227 |
+ --deselect qtpy/tests/test_main.py::test_qt_api_environ[PyQt5] \ |
228 |
+ --deselect qtpy/tests/test_main.py::test_qt_api_environ[PyQt6] \ |
229 |
+ --deselect qtpy/tests/test_qtsensors.py::test_qtsensors |
230 |
+ # Qt6Sensors not yet packaged and enabled in PySide6 ebuild |
231 |
+ fi |
232 |
+} |
233 |
+ |
234 |
+pkg_postinst() { |
235 |
+ elog "When multiple Qt4Python targets are enabled QtPy will default to" |
236 |
+ elog "the first enabled target in this order: PyQt5 PySide2 PyQt6 PySide6." |
237 |
+ elog "This can be overridden with the QT_API environment variable." |
238 |
+} |