Patch back in Python 3.6 support on RHEL 8

This commit is contained in:
Nikita Popov 2024-07-19 13:17:57 +00:00 committed by Timm Bäder
parent 7d226f4859
commit 712adc2eb0
3 changed files with 57 additions and 1 deletions

View file

@ -0,0 +1,50 @@
From fea6f0e31253ad0f335eea2e4718bacd5930d6d4 Mon Sep 17 00:00:00 2001
From: Nikita Popov <npopov@redhat.com>
Date: Fri, 19 Jul 2024 14:52:49 +0200
Subject: [PATCH] Add back support for Python 3.6
---
llvm/CMakeLists.txt | 2 +-
llvm/utils/update_test_body.py | 6 ++++--
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/llvm/CMakeLists.txt b/llvm/CMakeLists.txt
index 12618966c4ad..9c4df0082a9a 100644
--- a/llvm/CMakeLists.txt
+++ b/llvm/CMakeLists.txt
@@ -932,7 +932,7 @@ set(LLVM_PROFDATA_FILE "" CACHE FILEPATH
if(LLVM_INCLUDE_TESTS)
# All LLVM Python files should be compatible down to this minimum version.
- set(LLVM_MINIMUM_PYTHON_VERSION 3.8)
+ set(LLVM_MINIMUM_PYTHON_VERSION 3.6)
else()
# FIXME: it is unknown if this is the actual minimum bound
set(LLVM_MINIMUM_PYTHON_VERSION 3.0)
diff --git a/llvm/utils/update_test_body.py b/llvm/utils/update_test_body.py
index 661b0270d783..152d0c5f8476 100755
--- a/llvm/utils/update_test_body.py
+++ b/llvm/utils/update_test_body.py
@@ -57,7 +57,8 @@ def process(args, path):
input="\n".join(
prolog[:-1] if prolog[-1].startswith(".endif") else prolog
).encode(),
- capture_output=True,
+ stdout=subprocess.PIPE,
+ stderr=subprocess.PIPE,
check=True,
)
except subprocess.CalledProcessError as ex:
@@ -71,7 +72,8 @@ def process(args, path):
sub = subprocess.run(
["sh", "-eu", "gen"],
- capture_output=True,
+ stdout=subprocess.PIPE,
+ stderr=subprocess.PIPE,
# Don't encode the directory information to the Clang output.
# Remove unneeded details (.ident) as well.
env=dict(
--
2.45.2

View file

@ -16,5 +16,8 @@ Patch3002: 0001-Always-build-shared-libs-for-LLD.patch
# Source2006: 0001-Produce-DWARF4-by-default.patch
#region RHEL patches
Patch9002: 0001-Remove-myst_parser-dependency-for-RHEL.patch
# All RHEL
Patch9001: 0001-Remove-myst_parser-dependency-for-RHEL.patch
# RHEL 8 only
Patch9002: 0001-Add-back-support-for-Python-3.6.patch
#endregion

View file

@ -15,8 +15,11 @@
%autopatch -M9000 -p1
%if %{defined rhel}
%patch -p1 -P9001
%if %rhel == 8
%patch -p1 -P9002
%endif
%endif
#region LLVM preparation