summaryrefslogtreecommitdiff
path: root/dev-python/qtconsole
diff options
context:
space:
mode:
Diffstat (limited to 'dev-python/qtconsole')
-rw-r--r--dev-python/qtconsole/Manifest1
-rw-r--r--dev-python/qtconsole/metadata.xml18
-rw-r--r--dev-python/qtconsole/qtconsole-5.7.2.ebuild75
3 files changed, 94 insertions, 0 deletions
diff --git a/dev-python/qtconsole/Manifest b/dev-python/qtconsole/Manifest
new file mode 100644
index 000000000000..faa76a4536f5
--- /dev/null
+++ b/dev-python/qtconsole/Manifest
@@ -0,0 +1 @@
+DIST qtconsole-5.7.2.tar.gz 436661 BLAKE2B 77f64dba2e1fbeedc2801c371dcfcfd152399792ae528279dd102a980c44ba3273359b482906c85731dead360f09ec006ae276061c7c2f90c39ed05258168437 SHA512 0082c53bb292981b1ddd142d1d6cae14ab31c8ab4edf3f8afac0a2dce68b6a11c8167b5894787f50a0d70f81083c153ef5a412ff122203fcca116fa6ed69d52a
diff --git a/dev-python/qtconsole/metadata.xml b/dev-python/qtconsole/metadata.xml
new file mode 100644
index 000000000000..2ba428a2da1b
--- /dev/null
+++ b/dev-python/qtconsole/metadata.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://docs.baldeagleos.com/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>sci@gentoo.org</email>
+ <name>Gentoo Science Project</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>python@gentoo.org</email>
+ <name>Python</name>
+ </maintainer>
+ <longdescription>
+ A rich Qt-based console for working with Jupyter kernels,
+ supporting rich media output, session export, and more.
+ </longdescription>
+ <stabilize-allarches />
+ <origin>baldeagleos-repo</origin>
+</pkgmetadata>
diff --git a/dev-python/qtconsole/qtconsole-5.7.2.ebuild b/dev-python/qtconsole/qtconsole-5.7.2.ebuild
new file mode 100644
index 000000000000..fae0db153b2f
--- /dev/null
+++ b/dev-python/qtconsole/qtconsole-5.7.2.ebuild
@@ -0,0 +1,75 @@
+# Copyright 1999-2026 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_{13..14} )
+PYTHON_REQ_USE="threads(+)"
+
+inherit distutils-r1 pypi virtualx
+
+DESCRIPTION="Qt-based console for Jupyter with support for rich media output"
+HOMEPAGE="
+ https://www.spyder-ide.org/
+ https://github.com/spyder-ide/qtconsole/
+ https://pypi.org/project/qtconsole/
+"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="amd64 ~arm arm64 ~loong ~riscv x86"
+
+RDEPEND="
+ >=dev-python/ipykernel-4.1[${PYTHON_USEDEP}]
+ dev-python/jupyter-core[${PYTHON_USEDEP}]
+ >=dev-python/jupyter-client-4.1.1[${PYTHON_USEDEP}]
+ dev-python/packaging[${PYTHON_USEDEP}]
+ dev-python/pygments[${PYTHON_USEDEP}]
+ >=dev-python/traitlets-5.2.2_p1[${PYTHON_USEDEP}]
+ >=dev-python/qtpy-2.4.0[${PYTHON_USEDEP},gui,printsupport,svg]
+"
+BDEPEND="
+ test? (
+ dev-python/qtpy[${PYTHON_USEDEP},svg,testlib]
+ )
+"
+
+PDEPEND="
+ dev-python/ipython[${PYTHON_USEDEP}]
+"
+
+distutils_enable_sphinx docs/source dev-python/sphinx-rtd-theme
+
+EPYTEST_PLUGINS=( pytest-{asyncio,qt} )
+EPYTEST_RERUNS=10
+distutils_enable_tests pytest
+
+src_prepare() {
+ distutils-r1_src_prepare
+
+ # remove upstream marks to let us override rerun count
+ # (this test suite is extremely flaky)
+ # https://github.com/pytest-dev/pytest-rerunfailures/issues/306
+ sed -i -e '/pytest\.mark\.flaky/d' qtconsole/tests/*.py || die
+}
+
+src_test() {
+ virtx distutils-r1_src_test
+}
+
+python_test() {
+ local EPYTEST_DESELECT=(
+ # TODO; expects exact HTML, so perhaps fragile
+ qtconsole/tests/test_jupyter_widget.py::TestJupyterWidget::test_other_output
+ )
+ local -x QT_API
+ for QT_API in pyqt5 pyqt6 pyside2 pyside6; do
+ if has_version "dev-python/qtpy[${QT_API}]"; then
+ local -x PYTEST_QT_API=${QT_API}
+ einfo "Testing with ${QT_API}"
+ nonfatal epytest ||
+ die "Tests failed with ${EPYTHON} / ${QT_API}"
+ fi
+ done
+}