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: Sun, 20 Feb 2022 16:33:10
Message-Id: 1645374783.62bd84b896478767fdeea58afe812d3a5182bc1c.mgorny@gentoo
1 commit: 62bd84b896478767fdeea58afe812d3a5182bc1c
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Sun Feb 20 16:28:30 2022 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Sun Feb 20 16:33:03 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=62bd84b8
7
8 dev-python/pytest-qt: Bump to EAPI 8, switch to PEP517, ext. py3.10
9
10 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
11
12 dev-python/pytest-qt/pytest-qt-4.0.2-r1.ebuild | 54 ++++++++++++++++++++++++++
13 1 file changed, 54 insertions(+)
14
15 diff --git a/dev-python/pytest-qt/pytest-qt-4.0.2-r1.ebuild b/dev-python/pytest-qt/pytest-qt-4.0.2-r1.ebuild
16 new file mode 100644
17 index 000000000000..ce2a9e32d833
18 --- /dev/null
19 +++ b/dev-python/pytest-qt/pytest-qt-4.0.2-r1.ebuild
20 @@ -0,0 +1,54 @@
21 +# Copyright 1999-2022 Gentoo Authors
22 +# Distributed under the terms of the GNU General Public License v2
23 +
24 +EAPI=8
25 +
26 +DISTUTILS_USE_PEP517=setuptools
27 +PYTHON_COMPAT=( python3_{8..10} )
28 +
29 +inherit distutils-r1 virtualx
30 +
31 +DESCRIPTION="Pytest plugin for PyQt5 and PySide2 applications"
32 +HOMEPAGE="
33 + https://pypi.org/project/pytest-qt/
34 + https://github.com/pytest-dev/pytest-qt/"
35 +SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
36 +
37 +LICENSE="MIT"
38 +SLOT="0"
39 +KEYWORDS="~amd64 ~arm64 ~x86"
40 +
41 +RDEPEND="dev-python/QtPy[gui,testlib,widgets(+),${PYTHON_USEDEP}]"
42 +BDEPEND="
43 + test? (
44 + dev-python/PyQt5[gui,testlib,widgets,${PYTHON_USEDEP}]
45 + dev-python/pyside2[gui,testlib,widgets,${PYTHON_USEDEP}]
46 + )
47 +"
48 +
49 +distutils_enable_tests pytest
50 +distutils_enable_sphinx docs dev-python/sphinx_rtd_theme
51 +
52 +src_test() {
53 + virtx distutils-r1_src_test
54 +}
55 +
56 +python_test() {
57 + # warnings from other plugins cause the test output matchers to fail
58 + local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
59 + local -x PYTEST_PLUGINS=pytestqt.plugin
60 +
61 + local EPYTEST_DESELECT=(
62 + # requires the window to be activated; that doesn't seem
63 + # to be possible inside Xvfb
64 + "tests/test_basics.py::test_wait_window[waitActive-True]"
65 +
66 + # we are forcing a specific module via envvar, effectively
67 + # overriding the config
68 + tests/test_basics.py::test_qt_api_ini_config
69 + tests/test_basics.py::test_qt_api_ini_config_with_envvar
70 + )
71 +
72 + PYTEST_QT_API="pyqt5" epytest || die
73 + PYTEST_QT_API="pyside2" epytest || die
74 +}