From a20000fbc7d109d4fd06786c8fdf4e7dcbeda4cf Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Tue, 16 Jul 2024 14:14:11 +0000 Subject: [PATCH] Build against Python 3.12 on RHEL 8 The minimum Python version has been raised to 3.8 in LLVM 19. --- build.spec.inc | 4 ++++ files.spec.inc | 4 ++-- packages.spec.inc | 27 ++++++++++++++++++--------- 3 files changed, 24 insertions(+), 11 deletions(-) diff --git a/build.spec.inc b/build.spec.inc index 9232954..3621702 100644 --- a/build.spec.inc +++ b/build.spec.inc @@ -187,7 +187,11 @@ popd %ifarch ppc64le -DLLDB_TEST_USER_ARGS=--skip-category=watchpoint \ %endif +%if 0%{?rhel} == 8 + -DLLDB_INCLUDE_TESTS:BOOL=OFF \ +%else -DLLDB_ENFORCE_STRICT_TEST_REQUIREMENTS:BOOL=ON \ +%endif %endif \ \ diff --git a/files.spec.inc b/files.spec.inc index 8c51a5b..0fa7a89 100644 --- a/files.spec.inc +++ b/files.spec.inc @@ -515,7 +515,7 @@ %endif %if %{without compat_build} -%files -n python3-clang +%files -n python%{python3_pkgversion}-clang %license clang/LICENSE.TXT %{python3_sitelib}/clang/ %endif @@ -651,7 +651,7 @@ %files -n %{pkg_name_lldb}-devel %{install_includedir}/lldb -%files -n python3-lldb +%files -n python%{python3_pkgversion}-lldb %{python3_sitearch}/lldb %endif #endregion diff --git a/packages.spec.inc b/packages.spec.inc index cee6a90..9197984 100644 --- a/packages.spec.inc +++ b/packages.spec.inc @@ -196,17 +196,21 @@ Development header files for clang tools. Summary: Integration of clang-format for git Requires: %{pkg_name_clang}-tools-extra = %{version}-%{release} Requires: git -Requires: python3 +Requires: python%{python3_pkgversion} %description -n git-clang-format%{pkg_suffix} clang-format integration for git. %if %{without compat_build} -%package -n python3-clang +%package -n python%{python3_pkgversion}-clang Summary: Python3 bindings for clang Requires: %{pkg_name_clang}-devel%{?_isa} = %{version}-%{release} -Requires: python3 -%description -n python3-clang +Requires: python%{python3_pkgversion} +%if 0%{?rhel} == 8 +# Became python3.12-clang in LLVM 19 +Obsoletes: python3-clang < 18.9 +%endif +%description -n python%{python3_pkgversion}-clang %{summary}. @@ -313,7 +317,7 @@ Summary: Next generation high-performance debugger License: Apache-2.0 WITH LLVM-exception OR NCSA URL: http://lldb.llvm.org/ -Requires: python3-lldb +Requires: python%{python3_pkgversion}-lldb %description -n %{pkg_name_lldb} LLDB is a next generation, high-performance debugger. It is built as a set @@ -328,14 +332,19 @@ Requires: %{pkg_name_lldb}%{?_isa} = %{version}-%{release} %description -n %{pkg_name_lldb}-devel The package contains header files for the LLDB debugger. -%package -n python3-lldb -%{?python_provide:%python_provide python3-lldb} +%package -n python%{python3_pkgversion}-lldb +%{?python_provide:%python_provide python%{python3_pkgversion}-lldb} Summary: Python module for LLDB -Requires: python3-six +Requires: python%{python3_pkgversion}-six Requires: %{pkg_name_lldb}%{?_isa} = %{version}-%{release} -%description -n python3-lldb +%if 0%{?rhel} == 8 +# Became python3.12-lldb in LLVM 19 +Obsoletes: python3-lldb < 18.9 +%endif + +%description -n python%{python3_pkgversion}-lldb The package contains the LLDB Python module. %endif #endregion