7 |
7 |
PYTHON_COMPAT=( python3_{10..11} )
|
8 |
8 |
PYTHON_REQ_USE="threads(+)"
|
9 |
9 |
|
10 |
|
inherit distutils-r1 pypi
|
|
10 |
inherit distutils-r1 pypi virtualx
|
11 |
11 |
|
12 |
12 |
DESCRIPTION="Qt-based console for Jupyter with support for rich media output"
|
13 |
13 |
HOMEPAGE="
|
... | ... | |
18 |
18 |
|
19 |
19 |
LICENSE="BSD"
|
20 |
20 |
SLOT="0"
|
21 |
|
KEYWORDS="amd64 ~arm arm64 ~loong x86"
|
|
21 |
KEYWORDS="~amd64 ~arm64 ~x86"
|
22 |
22 |
|
23 |
23 |
RDEPEND="
|
24 |
24 |
>=dev-python/ipykernel-4.1[${PYTHON_USEDEP}]
|
... | ... | |
33 |
33 |
"
|
34 |
34 |
BDEPEND="
|
35 |
35 |
test? (
|
|
36 |
dev-python/flaky[${PYTHON_USEDEP}]
|
|
37 |
dev-python/pytest-qt[${PYTHON_USEDEP}]
|
36 |
38 |
dev-python/QtPy[${PYTHON_USEDEP},svg,testlib]
|
37 |
39 |
)
|
38 |
40 |
"
|
39 |
|
# required by the tests that are removed:
|
40 |
|
# dev-python/flaky[${PYTHON_USEDEP}]
|
41 |
|
# dev-python/pytest-qt[${PYTHON_USEDEP}]
|
42 |
41 |
|
43 |
42 |
PDEPEND="
|
44 |
43 |
dev-python/ipython[${PYTHON_USEDEP}]
|
... | ... | |
47 |
46 |
distutils_enable_sphinx docs/source dev-python/sphinx-rtd-theme
|
48 |
47 |
distutils_enable_tests pytest
|
49 |
48 |
|
|
49 |
src_test() {
|
|
50 |
virtx distutils-r1_src_test
|
|
51 |
}
|
|
52 |
|
50 |
53 |
python_test() {
|
51 |
|
# TODO: these tests require virtx; however, running under virtx
|
52 |
|
# causes pytest to segv on exit (even though tests pass)
|
53 |
|
local EPYTEST_IGNORE=(
|
54 |
|
qtconsole/tests/test_00_console_widget.py
|
55 |
|
qtconsole/tests/test_jupyter_widget.py
|
|
54 |
local EPYTEST_DESELECT=(
|
|
55 |
# TODO; expects exact HTML, so perhaps fragile
|
|
56 |
qtconsole/tests/test_jupyter_widget.py::TestJupyterWidget::test_other_output
|
56 |
57 |
)
|
57 |
58 |
local -x QT_API
|
58 |
59 |
for QT_API in pyqt5 pyqt6 pyside2 pyside6; do
|
59 |
60 |
if has_version "dev-python/QtPy[${QT_API}]"; then
|
60 |
61 |
local -x PYTEST_QT_API=${QT_API}
|
61 |
62 |
einfo "Testing with ${QT_API}"
|
62 |
|
epytest
|
|
63 |
nonfatal epytest ||
|
|
64 |
die "Tests failed with ${EPYTHON} / ${QT_API}"
|
63 |
65 |
fi
|
64 |
66 |
done
|
65 |
67 |
}
|