diff --git a/build-python312.patch b/build-python312.patch new file mode 100644 index 0000000..add5bb4 --- /dev/null +++ b/build-python312.patch @@ -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) diff --git a/thunderbird.spec b/thunderbird.spec index a5cef3f..b41977e 100644 --- a/thunderbird.spec +++ b/thunderbird.spec @@ -109,6 +109,7 @@ Patch103: rhbz-1219542-s390-build.patch Patch422: 0001-GLIBCXX-fix-for-GCC-12.patch Patch425: build-disable-elfhack.patch Patch426: build-rnp.patch +Patch427: build-python312.patch # PPC fix 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 %endif %patch -P 426 -p1 -b .build-rnp +# python3.12 is not supported yet +%patch -P 427 -p1 -b .build-python312 # most likely fixed #%patch -P 419 -p1 -b .bindgen @@ -518,10 +521,6 @@ MOZ_SMP_FLAGS=-j1 export MOZ_MAKE_FLAGS="$MOZ_SMP_FLAGS" 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 ./mach build -v