From a90f5996dec1e295f6b9f199e6888b30434573a2 Mon Sep 17 00:00:00 2001 From: "Herman S." <429230+has207@users.noreply.github.com> Date: Thu, 26 Mar 2026 21:10:33 +0900 Subject: [PATCH] [Build] Python min version -> 3.6 Remove 3.10 syntax sugar and reduce min required python version to avoid having to do needless python upgrades on various dev systems as 3.10 is not yet ubiquitous and building on older systems is also still a thing. --- docs/building.md | 2 +- xenia-build.py | 11 +++++------ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/docs/building.md b/docs/building.md index bc874847e..011c553fe 100644 --- a/docs/building.md +++ b/docs/building.md @@ -12,7 +12,7 @@ drivers. * [Visual Studio 2022](https://www.visualstudio.com/downloads/) * CMake 3.10+ (or C++ CMake tools for Windows) * Windows 11 SDK version 10.0.22000.0 (for Visual Studio 2022, this or any newer version) -* [Python 3.10+ 64-bit](https://www.python.org/downloads/) +* [Python 3.6+ 64-bit](https://www.python.org/downloads/) * Ensure Python is in PATH. * [Vulkan SDK](https://sdk.lunarg.com/sdk/download/latest/windows/vulkan-sdk.exe) * The build script will automatically detect it if installed at `C:\VulkanSDK` diff --git a/xenia-build.py b/xenia-build.py index 72a18b712..d7fbaee53 100755 --- a/xenia-build.py +++ b/xenia-build.py @@ -95,11 +95,10 @@ class ResultStatus(enum.Enum): FAILURE = enum.auto() def print_status(status: ResultStatus): - match status: - case ResultStatus.SUCCESS: - print(f"{bcolors.OKCYAN}Success!{bcolors.ENDC}") - case ResultStatus.FAILURE: - print(f"{bcolors.FAIL}Error!{bcolors.ENDC}") + if status == ResultStatus.SUCCESS: + print(f"{bcolors.OKCYAN}Success!{bcolors.ENDC}") + elif status == ResultStatus.FAILURE: + print(f"{bcolors.FAIL}Error!{bcolors.ENDC}") # Detect if building on Android via Termux. @@ -320,7 +319,7 @@ def main(): print_warning("The source tree is unversioned. Version info will be omitted from all binaries!\n") # Check python version. - python_minimum_ver = 3,10 + python_minimum_ver = 3,6 if not sys.version_info[:2] >= (python_minimum_ver[0], python_minimum_ver[1]) or not sys.maxsize > 2**32: print_error(f"Python {python_minimum_ver[0]}.{python_minimum_ver[1]}+ 64-bit must be installed and on PATH") sys.exit(1)