commit: cd152022ed8f165b830911ff277c07669533aa1e
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sat May 31 17:15:54 2025 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sat May 31 17:27:37 2025 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cd152022
dev-python/curtsies: Enable py3.14
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
...tsies-0.4.2.ebuild => curtsies-0.4.2-r1.ebuild} | 15 +++++++++---
dev-python/curtsies/curtsies-0.4.2.ebuild | 4 ++--
.../curtsies/files/curtsies-0.4.2-py314.patch | 28 ++++++++++++++++++++++
3 files changed, 42 insertions(+), 5 deletions(-)
diff --git a/dev-python/curtsies/curtsies-0.4.2.ebuild
b/dev-python/curtsies/curtsies-0.4.2-r1.ebuild
similarity index 62%
copy from dev-python/curtsies/curtsies-0.4.2.ebuild
copy to dev-python/curtsies/curtsies-0.4.2-r1.ebuild
index 1b0507288e2f..0cf9939c1ea9 100644
--- a/dev-python/curtsies/curtsies-0.4.2.ebuild
+++ b/dev-python/curtsies/curtsies-0.4.2-r1.ebuild
@@ -1,10 +1,10 @@
-# Copyright 1999-2024 Gentoo Authors
+# 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_{10..13} )
+PYTHON_COMPAT=( python3_{11..14} )
inherit distutils-r1 pypi
@@ -16,7 +16,7 @@ HOMEPAGE="
LICENSE="MIT"
SLOT="0"
-KEYWORDS="amd64 arm64 ~riscv x86 ~amd64-linux ~x86-linux"
+KEYWORDS="~amd64 ~arm64 ~riscv ~x86 ~amd64-linux ~x86-linux"
RDEPEND="
>=dev-python/blessed-1.5[${PYTHON_USEDEP}]
@@ -29,3 +29,12 @@ BDEPEND="
"
distutils_enable_tests pytest
+
+src_prepare() {
+ local PATCHES=(
+ # https://github.com/bpython/curtsies/pull/186
+ "${FILESDIR}/${P}-py314.patch"
+ )
+ distutils-r1_src_prepare
+ rm setup.py || die
+}
diff --git a/dev-python/curtsies/curtsies-0.4.2.ebuild
b/dev-python/curtsies/curtsies-0.4.2.ebuild
index 1b0507288e2f..7f5caedeac4b 100644
--- a/dev-python/curtsies/curtsies-0.4.2.ebuild
+++ b/dev-python/curtsies/curtsies-0.4.2.ebuild
@@ -1,10 +1,10 @@
-# Copyright 1999-2024 Gentoo Authors
+# 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_{10..13} )
+PYTHON_COMPAT=( python3_{11..14} )
inherit distutils-r1 pypi
diff --git a/dev-python/curtsies/files/curtsies-0.4.2-py314.patch
b/dev-python/curtsies/files/curtsies-0.4.2-py314.patch
new file mode 100644
index 000000000000..3b53a479f358
--- /dev/null
+++ b/dev-python/curtsies/files/curtsies-0.4.2-py314.patch
@@ -0,0 +1,28 @@
+From 8ff589184cdc0a2face9bd3430757f672292462c Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <[email protected]>
+Date: Sat, 31 May 2025 19:22:56 +0200
+Subject: [PATCH] Use standard setuptools `attr:` feature, fixing Python 3.14
+ compat
+
+Use the standard setuptools `attr:` feature to obtain the version
+via setuptools' built-in AST parser rather than writing a custom AST
+parser in `setup.py`. This fixes compatibility with Python 3.14,
+since the custom parser is not compatible with the new `ast.Constant`
+type.
+---
+ setup.cfg | 1 +
+ setup.py | 16 ----------------
+ 2 files changed, 1 insertion(+), 16 deletions(-)
+ delete mode 100644 setup.py
+
+diff --git a/setup.cfg b/setup.cfg
+index 10332bd..ae01e92 100644
+--- a/setup.cfg
++++ b/setup.cfg
+@@ -1,5 +1,6 @@
+ [metadata]
+ name = curtsies
++version = attr: curtsies.__version__
+ description = Curses-like terminal wrapper, with colored strings!
+ long_description = file: README.md,
+ long_description_content_type = text/markdown