Use python3.11 instead of python3.12

This commit is contained in:
Jan Horak 2023-07-26 14:35:35 +02:00
parent 9142c39a1f
commit 28f70df4a7
2 changed files with 15 additions and 4 deletions

12
build-python312.patch Normal file
View File

@ -0,0 +1,12 @@
diff -up thunderbird-115.0.1/mach.python312 thunderbird-115.0.1/mach
--- thunderbird-115.0.1/mach.python312 2023-07-26 14:30:25.336532252 +0200
+++ thunderbird-115.0.1/mach 2023-07-26 14:31:19.056512905 +0200
@@ -67,7 +67,7 @@ def try_alternate_python3_executables(ar
def main(args):
# Ensure we are running Python 3.7+. We run this check as soon as
# possible to avoid a cryptic import/usage error.
- if sys.version_info < MIN_PYTHON_VERSION:
+ if sys.version_info < MIN_PYTHON_VERSION or sys.version_info > MAX_PYTHON_VERSION_TO_CONSIDER:
print(f"Python {MIN_PYTHON_VERSION[0]}.{MIN_PYTHON_VERSION[1]}+ is required to run mach.")
print("You are running Mach with Python {0}".format(platform.python_version()))
try_alternate_python3_executables(args)

View File

@ -109,6 +109,7 @@ Patch103: rhbz-1219542-s390-build.patch
Patch422: 0001-GLIBCXX-fix-for-GCC-12.patch Patch422: 0001-GLIBCXX-fix-for-GCC-12.patch
Patch425: build-disable-elfhack.patch Patch425: build-disable-elfhack.patch
Patch426: build-rnp.patch Patch426: build-rnp.patch
Patch427: build-python312.patch
# PPC fix # PPC fix
Patch304: mozilla-1245783.patch Patch304: mozilla-1245783.patch
@ -278,6 +279,8 @@ debug %{name}, you want to install %{name}-debuginfo instead.
%patch -P 425 -p1 -b .build-disable-elfhack %patch -P 425 -p1 -b .build-disable-elfhack
%endif %endif
%patch -P 426 -p1 -b .build-rnp %patch -P 426 -p1 -b .build-rnp
# python3.12 is not supported yet
%patch -P 427 -p1 -b .build-python312
# most likely fixed # most likely fixed
#%patch -P 419 -p1 -b .bindgen #%patch -P 419 -p1 -b .bindgen
@ -518,10 +521,6 @@ MOZ_SMP_FLAGS=-j1
export MOZ_MAKE_FLAGS="$MOZ_SMP_FLAGS" export MOZ_MAKE_FLAGS="$MOZ_SMP_FLAGS"
export STRIP=/bin/true export STRIP=/bin/true
export PYTHON=python3.11
%if 0%{?fedora} >= 39
alias python=python3.11
%endif
export MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE=system export MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE=system
./mach build -v ./mach build -v