From 71c25cd9f9cdb4d4d5fbbd64d23d01837025bc89 Mon Sep 17 00:00:00 2001 From: David Seifert Date: Tue, 8 Sep 2026 18:26:44 +0200 Subject: [PATCH] dev-python/sip: backport `%MinimumABIVersion` patch Bug: https://bugs.gentoo.org/981016 Signed-off-by: David Seifert --- ...ip-6.16.1-legacy-abi-without-minimum.patch | 27 ++++++++++ dev-python/sip/sip-6.16.1-r1.ebuild | 49 +++++++++++++++++++ 2 files changed, 76 insertions(+) create mode 100644 dev-python/sip/files/sip-6.16.1-legacy-abi-without-minimum.patch create mode 100644 dev-python/sip/sip-6.16.1-r1.ebuild diff --git a/dev-python/sip/files/sip-6.16.1-legacy-abi-without-minimum.patch b/dev-python/sip/files/sip-6.16.1-legacy-abi-without-minimum.patch new file mode 100644 index 0000000000000..b3f1afcfda4c5 --- /dev/null +++ b/dev-python/sip/files/sip-6.16.1-legacy-abi-without-minimum.patch @@ -0,0 +1,27 @@ +From 09598895c607f3e41f0249ade217ace0a4da6437 Mon Sep 17 00:00:00 2001 +From: Phil Thompson +Date: Sun, 23 Aug 2026 12:18:00 +0100 +Subject: [PATCH] Bug fixes + +- Fixed a regression in SIP v6.16.1 that meant that bindings using legacy +ABIs would not build if they didn't specify `%MinimumABIVersion`. +Resolves #114 +--- + sipbuild/generator/parser/parser_manager.py | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/sipbuild/generator/parser/parser_manager.py b/sipbuild/generator/parser/parser_manager.py +index 8f2501ff..83c63310 100644 +--- a/sipbuild/generator/parser/parser_manager.py ++++ b/sipbuild/generator/parser/parser_manager.py +@@ -1938,6 +1938,10 @@ def _finalise_abi_version(self): + # We have no minimum version information from which to derive a + # major version so use the default. + major = DEFAULT_ABI_MAJOR ++ elif major <= 13 and not minimums: ++ # Allow older ABIs that don't specify %MinimumABIVersion. This ++ # case can be removed in SIP v7. ++ pass + else: + # Check that this major version is supported and that any minor + # version meets the minimum requirements. diff --git a/dev-python/sip/sip-6.16.1-r1.ebuild b/dev-python/sip/sip-6.16.1-r1.ebuild new file mode 100644 index 0000000000000..9fb499f41c0a8 --- /dev/null +++ b/dev-python/sip/sip-6.16.1-r1.ebuild @@ -0,0 +1,49 @@ +# 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_{12..15} ) +inherit distutils-r1 + +DESCRIPTION="Python bindings generator for C/C++ libraries" +HOMEPAGE="https://github.com/Python-SIP/sip/" +SRC_URI=" + https://github.com/Python-SIP/sip/archive/refs/tags/${PV}.tar.gz + -> ${P}.gh.tar.gz +" + +LICENSE="BSD-2 BSD" +SLOT="5" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86" + +RDEPEND=" + dev-python/packaging[${PYTHON_USEDEP}] + dev-python/setuptools[${PYTHON_USEDEP}] +" +BDEPEND=" + >=dev-python/setuptools-scm-8[${PYTHON_USEDEP}] +" + +PATCHES=( + # https://github.com/Python-SIP/sip/issues/114 + "${FILESDIR}/${P}-legacy-abi-without-minimum.patch" +) + +distutils_enable_sphinx docs \ + dev-python/myst-parser \ + dev-python/sphinx-rtd-theme + +EPYTEST_PLUGINS=() +distutils_enable_tests pytest + +python_test() { + # the latest ABI version gets tested by default, but ABI 14 + # requires python3.15 or higher + local epytestargs=() + [[ ${EPYTHON} =~ python3.1[2-4]t? ]] && + epytestargs=( --sip-abi-version=13 ) + + epytest "${epytestargs[@]}" +}