summaryrefslogtreecommitdiff
path: root/dev-python
diff options
context:
space:
mode:
Diffstat (limited to 'dev-python')
-rw-r--r--dev-python/bpython/Manifest1
-rw-r--r--dev-python/bpython/bpython-0.26.ebuild49
-rw-r--r--dev-python/bpython/files/bpython-0.26-urwid-3.patch36
3 files changed, 86 insertions, 0 deletions
diff --git a/dev-python/bpython/Manifest b/dev-python/bpython/Manifest
index 9b32542b381e..67d8204940a2 100644
--- a/dev-python/bpython/Manifest
+++ b/dev-python/bpython/Manifest
@@ -1 +1,2 @@
DIST bpython-0.25.tar.gz 207610 BLAKE2B d180838ddbf87165acf44214bdf3d5983ebcecb529647ecdd4f1b8f7c325a1d7013e47908ee88bdacacec9ba9b0b3f3052fc88999128416e6a01e1b7cfa1194b SHA512 052a84666e5e559a883964d8eb41a1ed8c704a9760799cdbe98d7fdcd8060815b5d7b26e7589a56735f91c1f1214b1cdf17ad30d6bed34a506233d2d9e0bbd2c
+DIST bpython-0.26.tar.gz 207564 BLAKE2B fce515c05a98a47f8271670d20eb77f98e8a7c33e234c0ad3277696229c2705593b66d79f080a3f1f7b1be45f81576a9fdf6a3ec642c76e29466b4d54bd3ad40 SHA512 02bd2b7b42e89bec9327509e2db463eeb609ddb5cacea7e58e0d033af11aacdc11b9e3c8555a8e280e7d7e6fa518b34142a89446b60326857b872f454e2034fe
diff --git a/dev-python/bpython/bpython-0.26.ebuild b/dev-python/bpython/bpython-0.26.ebuild
new file mode 100644
index 000000000000..d342e1e3e935
--- /dev/null
+++ b/dev-python/bpython/bpython-0.26.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_{11..14} )
+
+inherit distutils-r1 pypi
+
+DESCRIPTION="Syntax highlighting and autocompletion for the Python interpreter"
+HOMEPAGE="
+ https://bpython-interpreter.org/
+ https://github.com/bpython/bpython/
+ https://pypi.org/project/bpython/
+"
+
+LICENSE="MIT BSD-2 PSF-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64 ~riscv ~x86"
+IUSE="clipboard +jedi watch"
+
+# see https://github.com/bpython/bpython/issues/641 wrt greenlet
+RDEPEND="
+ >=dev-python/curtsies-0.4.0[${PYTHON_USEDEP}]
+ dev-python/cwcwidth[${PYTHON_USEDEP}]
+ dev-python/greenlet[${PYTHON_USEDEP}]
+ dev-python/pygments[${PYTHON_USEDEP}]
+ dev-python/pyxdg[${PYTHON_USEDEP}]
+ dev-python/requests[${PYTHON_USEDEP}]
+ clipboard? ( dev-python/pyperclip[${PYTHON_USEDEP}] )
+ jedi? ( dev-python/jedi[${PYTHON_USEDEP}] )
+ watch? ( dev-python/watchdog[${PYTHON_USEDEP}] )
+"
+# sphinx is used implicitly to build manpages
+BDEPEND="
+ dev-python/wheel[${PYTHON_USEDEP}]
+ dev-python/sphinx[${PYTHON_USEDEP}]
+"
+
+distutils_enable_sphinx doc/sphinx/source --no-autodoc
+distutils_enable_tests unittest
+
+DOCS=( AUTHORS.rst CHANGELOG.rst )
+
+PATCHES=(
+ # https://github.com/bpython/bpython/commit/bbc9438a2638d60f131ede56d7c21a6f96592927
+ "${FILESDIR}/${P}-urwid-3.patch"
+)
diff --git a/dev-python/bpython/files/bpython-0.26-urwid-3.patch b/dev-python/bpython/files/bpython-0.26-urwid-3.patch
new file mode 100644
index 000000000000..4a563a455877
--- /dev/null
+++ b/dev-python/bpython/files/bpython-0.26-urwid-3.patch
@@ -0,0 +1,36 @@
+From bbc9438a2638d60f131ede56d7c21a6f96592927 Mon Sep 17 00:00:00 2001
+From: Sebastian Ramacher <sebastian@ramacher.at>
+Date: Tue, 28 Oct 2025 23:12:28 +0100
+Subject: [PATCH] Fix compatibility with urwid 3.0 (fixes #1043)
+
+--- a/bpython/urwid.py
++++ b/bpython/urwid.py
+@@ -411,7 +411,7 @@ def keypress(self, size, key):
+ return key
+
+
+-class Tooltip(urwid.BoxWidget):
++class Tooltip(urwid.Widget):
+ """Container inspired by Overlay to position our tooltip.
+
+ bottom_w should be a BoxWidget.
+@@ -423,6 +423,9 @@ class Tooltip(urwid.BoxWidget):
+ from the bottom window and hides it if there is no cursor.
+ """
+
++ _sizing = frozenset(['box'])
++ _selectable = True
++
+ def __init__(self, bottom_w, listbox):
+ super().__init__()
+
+@@ -1322,7 +1325,8 @@ def run_find_coroutine():
+
+ run_find_coroutine()
+
+- myrepl.main_loop.screen.run_wrapper(run_with_screen_before_mainloop)
++ with myrepl.main_loop.screen.start():
++ run_with_screen_before_mainloop()
+
+ if config.flush_output and not options.quiet:
+ sys.stdout.write(myrepl.getstdout())