Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/pytest-qt/
Date: Fri, 24 Jun 2022 05:16:39
Message-Id: 1656047789.7ef2f050b4df7d6d73ae67b3d8b4d797a483325a.mgorny@gentoo
1 commit: 7ef2f050b4df7d6d73ae67b3d8b4d797a483325a
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Fri Jun 24 05:06:35 2022 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Fri Jun 24 05:16:29 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7ef2f050
7
8 dev-python/pytest-qt: Bump to 4.1.0
9
10 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
11
12 dev-python/pytest-qt/Manifest | 1 +
13 dev-python/pytest-qt/pytest-qt-4.1.0.ebuild | 65 +++++++++++++++++++++++++++++
14 2 files changed, 66 insertions(+)
15
16 diff --git a/dev-python/pytest-qt/Manifest b/dev-python/pytest-qt/Manifest
17 index 82b75962d056..b2b6f18692fd 100644
18 --- a/dev-python/pytest-qt/Manifest
19 +++ b/dev-python/pytest-qt/Manifest
20 @@ -1 +1,2 @@
21 DIST pytest-qt-4.0.2.tar.gz 113466 BLAKE2B 73ba6571958f3f4cd76c3e891eaa014d464b94a7965afac6cee5b43bafdc63d4d640f84c7bfa1666146ab5139f79c760bd9f5a2a44f788b6384df200ac48ad0d SHA512 7f59c499e1395460c2ff20a969cec16ca104f742c648faa0d7eb1528c04d8ee52c04c52798478bc01c5467bee33d3389b141424491ba5442f9df4e82f0dff173
22 +DIST pytest-qt-4.1.0.tar.gz 119702 BLAKE2B 7c906c94761df6472ae65a6ebb38dff07de8156730e3e10615ea8e08f0bd9f9fee07127ee6e8616055117b1db1911bc9b4486345d84b249664d317561195ad77 SHA512 bfb56abbaac47bf9da26eb19d6913d59872f2a9923da339e9a30a2145d0a094ddec36bcfa21d39c4cf318f95a83c72c249fe70034294a6791f9d84345f77451d
23
24 diff --git a/dev-python/pytest-qt/pytest-qt-4.1.0.ebuild b/dev-python/pytest-qt/pytest-qt-4.1.0.ebuild
25 new file mode 100644
26 index 000000000000..69dbc6a6d79f
27 --- /dev/null
28 +++ b/dev-python/pytest-qt/pytest-qt-4.1.0.ebuild
29 @@ -0,0 +1,65 @@
30 +# Copyright 1999-2022 Gentoo Authors
31 +# Distributed under the terms of the GNU General Public License v2
32 +
33 +EAPI=8
34 +
35 +DISTUTILS_USE_PEP517=setuptools
36 +PYTHON_COMPAT=( python3_{8..11} )
37 +PYSIDE2_COMPAT=( python3_{8..10} )
38 +
39 +inherit distutils-r1 virtualx
40 +
41 +DESCRIPTION="Pytest plugin for PyQt5 and PySide2 applications"
42 +HOMEPAGE="
43 + https://pypi.org/project/pytest-qt/
44 + https://github.com/pytest-dev/pytest-qt/
45 +"
46 +SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
47 +
48 +LICENSE="MIT"
49 +SLOT="0"
50 +KEYWORDS="~amd64 ~arm64 ~x86"
51 +
52 +RDEPEND="
53 + dev-python/QtPy[gui,testlib,widgets(+),${PYTHON_USEDEP}]
54 +"
55 +BDEPEND="
56 + test? (
57 + dev-python/PyQt5[gui,testlib,widgets,${PYTHON_USEDEP}]
58 + $(python_gen_cond_dep '
59 + dev-python/pyside2[gui,testlib,widgets,${PYTHON_USEDEP}]
60 + ' "${PYSIDE2_COMPAT[@]}")
61 + )
62 +"
63 +
64 +distutils_enable_tests pytest
65 +distutils_enable_sphinx docs dev-python/sphinx_rtd_theme
66 +
67 +src_test() {
68 + virtx distutils-r1_src_test
69 +}
70 +
71 +python_test() {
72 + # warnings from other plugins cause the test output matchers to fail
73 + local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
74 + local -x PYTEST_PLUGINS=pytestqt.plugin
75 +
76 + local EPYTEST_DESELECT=(
77 + # requires the window to be activated; that doesn't seem
78 + # to be possible inside Xvfb
79 + "tests/test_basics.py::test_wait_window[waitActive-True]"
80 +
81 + # we are forcing a specific module via envvar, effectively
82 + # overriding the config
83 + tests/test_basics.py::test_qt_api_ini_config
84 + tests/test_basics.py::test_qt_api_ini_config_with_envvar
85 + )
86 +
87 + einfo "Testing with PyQt5"
88 + PYTEST_QT_API="pyqt5" epytest || die
89 + # Pyside2 is not compatible with python3.11
90 + if has "${EPYTHON}" "${PYSIDE2_COMPAT[@]/_/.}"; then
91 + einfo "Testing with PySide2"
92 + PYTEST_QT_API="pyside2" epytest || die
93 + fi
94 +}