blob: 17105ed9f29b6dd937b0fc57d26050ad8e600610 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
|
# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DISTUTILS_USE_PEP517=hatchling
PYPI_VERIFY_REPO=https://github.com/pyapp-kit/superqt
PYTHON_COMPAT=( python3_{12..14} )
inherit distutils-r1 pypi virtualx
DESCRIPTION="Missing widgets and components for PyQt/PySide"
HOMEPAGE="
https://github.com/pyapp-kit/superqt/
https://pypi.org/project/superqt/
"
LICENSE="BSD"
SLOT="0"
KEYWORDS="~amd64 ~arm64"
RDEPEND="
>=dev-python/pygments-2.4.0[${PYTHON_USEDEP}]
>=dev-python/qtpy-2.4.0[${PYTHON_USEDEP}]
>=dev-python/typing-extensions-4.12.0[${PYTHON_USEDEP}]
"
BDEPEND="
dev-python/hatch-vcs[${PYTHON_USEDEP}]
test? (
dev-python/numpy[${PYTHON_USEDEP}]
)
"
EPYTEST_PLUGINS=( pytest-qt )
EPYTEST_XDIST=1
distutils_enable_tests pytest
src_test() {
local ALL_QT_APIS=()
local api
for api in pyqt6 pyside6; do
has_version "dev-python/qtpy[${api},${PYTHON_USEDEP}]" || continue
ALL_QT_APIS+=( "${api}" )
done
[[ -z ${ALL_QT_APIS[@]} ]] && die "No Qt6 implementation found?!"
virtx distutils-r1_src_test
}
python_test() {
local EPYTEST_IGNORE=(
# pint and pyconify not packaged
tests/test_quantity.py
tests/test_iconify.py
)
local EPYTEST_DESELECT=()
for api in "${ALL_QT_APIS[@]}"; do
case ${api} in
pyqt6)
EPYTEST_DESELECT=(
# crashing on assertions
tests/test_color_combo.py::test_q_color_combobox
)
;;
esac
einfo "Testing with ${api}"
epytest -o "qt_api=${api}"
done
}
|