commit:     0a2ed735524c09ba687e6abf6134d7f683e03bf7
Author:     Eli Schwartz <eschwartz <AT> gentoo <DOT> org>
AuthorDate: Wed Apr 16 19:45:09 2025 +0000
Commit:     Eli Schwartz <eschwartz <AT> gentoo <DOT> org>
CommitDate: Thu Apr 17 17:22:14 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0a2ed735

llvm-core/llvm: enable py3.13 for old versions

Python is currently only used for two things in llvm:15, and that is:

- Test-time use of llvm-lit, see corresponding change to dev-python/lit
  for why it is safe to enable py3.13.

  Note that llvm-lit loads cfg files which are python scripts used by the
  test. Some unmaintained code removed in llvm:16 uses a python module
  removed in 3.13, but we never built it to begin with so the easiest
  fix is to remove it entirely so that llvm-lit does not try to load it
  and fail with ModuleNotFoundError.

- USE=docs. We could drop docs from ancient slots, but it is just
  sphinx with a trivial conf.py and it does work, so we might as well
  allow it.

Acked-by: Sam James <sam <AT> gentoo.org>
Signed-off-by: Eli Schwartz <eschwartz <AT> gentoo.org>

 llvm-core/llvm/llvm-15.0.7-r7.ebuild | 10 ++++++++--
 llvm-core/llvm/llvm-16.0.6-r5.ebuild |  4 ++--
 llvm-core/llvm/llvm-17.0.6-r3.ebuild |  4 ++--
 3 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/llvm-core/llvm/llvm-15.0.7-r7.ebuild 
b/llvm-core/llvm/llvm-15.0.7-r7.ebuild
index e6f08b13f041..61161d1dc79d 100644
--- a/llvm-core/llvm/llvm-15.0.7-r7.ebuild
+++ b/llvm-core/llvm/llvm-15.0.7-r7.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2024 Gentoo Authors
+# Copyright 1999-2025 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
 
-PYTHON_COMPAT=( python3_{10..11} )
+PYTHON_COMPAT=( python3_{10..13} )
 inherit cmake flag-o-matic llvm.org multilib-minimal pax-utils python-any-r1 \
        toolchain-funcs
 
@@ -180,6 +180,12 @@ src_prepare() {
        check_uptodate
 
        llvm.org_src_prepare
+
+       # unmaintained, python <3.13 removed modules in the test cfg. We don't
+       # build them anyway, so no need to run the test in order to report
+       # "skipped". And llvm 16 removes this from the source anyway.
+       rm -r test/Bindings/Go/ || die
+
 }
 
 get_distribution_components() {

diff --git a/llvm-core/llvm/llvm-16.0.6-r5.ebuild 
b/llvm-core/llvm/llvm-16.0.6-r5.ebuild
index 9e393e15c202..fd12854df95b 100644
--- a/llvm-core/llvm/llvm-16.0.6-r5.ebuild
+++ b/llvm-core/llvm/llvm-16.0.6-r5.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2024 Gentoo Authors
+# Copyright 1999-2025 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
 
-PYTHON_COMPAT=( python3_{10..12} )
+PYTHON_COMPAT=( python3_{10..13} )
 
 inherit cmake flag-o-matic llvm.org multilib-minimal pax-utils python-any-r1
 inherit toolchain-funcs

diff --git a/llvm-core/llvm/llvm-17.0.6-r3.ebuild 
b/llvm-core/llvm/llvm-17.0.6-r3.ebuild
index 03c5535d257d..313ba4b209d4 100644
--- a/llvm-core/llvm/llvm-17.0.6-r3.ebuild
+++ b/llvm-core/llvm/llvm-17.0.6-r3.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2024 Gentoo Authors
+# Copyright 1999-2025 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
 
-PYTHON_COMPAT=( python3_{10..12} )
+PYTHON_COMPAT=( python3_{10..13} )
 
 inherit cmake flag-o-matic llvm.org multilib-minimal pax-utils python-any-r1
 inherit toolchain-funcs

Reply via email to