From fb34e5df3a3e6a75636dd645dc495c70352b0495 Mon Sep 17 00:00:00 2001 From: Huang Rui Date: Wed, 20 May 2026 19:20:18 +0800 Subject: [PATCH] sci-electronics/cocotb: add 2.0.1-r1 for py3.14, drop 2.0.1 - Lift upstream setup.py max_python3_minor_version 13 to 14 via patch. - Verified: pip wheel build, C extensions, core imports OK on 3.14.5. Closes: https://bugs.gentoo.org/975540 Signed-off-by: Huang Rui --- ...tb-2.0.1.ebuild => cocotb-2.0.1-r1.ebuild} | 6 +++- .../files/cocotb-2.0.1-python-3.14.patch | 30 +++++++++++++++++++ 2 files changed, 35 insertions(+), 1 deletion(-) rename sci-electronics/cocotb/{cocotb-2.0.1.ebuild => cocotb-2.0.1-r1.ebuild} (93%) create mode 100644 sci-electronics/cocotb/files/cocotb-2.0.1-python-3.14.patch diff --git a/sci-electronics/cocotb/cocotb-2.0.1.ebuild b/sci-electronics/cocotb/cocotb-2.0.1-r1.ebuild similarity index 93% rename from sci-electronics/cocotb/cocotb-2.0.1.ebuild rename to sci-electronics/cocotb/cocotb-2.0.1-r1.ebuild index f7ed8abad2..9f64452c18 100644 --- a/sci-electronics/cocotb/cocotb-2.0.1.ebuild +++ b/sci-electronics/cocotb/cocotb-2.0.1-r1.ebuild @@ -3,7 +3,7 @@ EAPI=8 -PYTHON_COMPAT=( python3_{12..13} ) +PYTHON_COMPAT=( python3_{12..14} ) DISTUTILS_USE_PEP517=setuptools DISTUTILS_EXT=1 inherit distutils-r1 pypi @@ -18,6 +18,10 @@ KEYWORDS="~amd64 ~arm64 ~riscv ~x86" # Tests requires many eda tools, and can't work inside network sandbox RESTRICT=test +PATCHES=( + "${FILESDIR}"/${P}-python-3.14.patch +) + RDEPEND=" dev-python/find-libpython[${PYTHON_USEDEP}] " diff --git a/sci-electronics/cocotb/files/cocotb-2.0.1-python-3.14.patch b/sci-electronics/cocotb/files/cocotb-2.0.1-python-3.14.patch new file mode 100644 index 0000000000..a596626fd9 --- /dev/null +++ b/sci-electronics/cocotb/files/cocotb-2.0.1-python-3.14.patch @@ -0,0 +1,30 @@ +From: Huang Rui +Date: Wed, 20 May 2026 11:00:00 +0800 +Subject: [PATCH] setup: raise max supported Python to 3.14 + +Gentoo systems ship python3_14 in the default profile. Upstream caps +installation at Python 3.13 via a hardcoded check in setup.py and +points at the COCOTB_IGNORE_PYTHON_REQUIRES environment variable as +the documented opt-out, explicitly without compatibility guarantees. +Lift the cap to 3.14 so the install-time gate accepts the Gentoo +default while leaving the 3.15+ gate in place. + +Bug: https://bugs.gentoo.org/975540 +Upstream-Status: Not applicable (downstream version-gate bypass) +Signed-off-by: Huang Rui +--- + setup.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/setup.py b/setup.py +--- a/setup.py ++++ b/setup.py +@@ -34,7 +34,7 @@ + + __version__ = "2.0.1" + +-max_python3_minor_version = 13 ++max_python3_minor_version = 14 + if "COCOTB_IGNORE_PYTHON_REQUIRES" not in os.environ and sys.version_info >= ( + 3, + max_python3_minor_version + 1,