Require Python 3.10+

3.9 is EOL.
This commit is contained in:
Margen67
2025-11-20 03:39:14 -08:00
parent eb6221d631
commit 79e1a2b866
5 changed files with 14 additions and 6 deletions

View File

@@ -55,6 +55,10 @@ jobs:
POWERSHELL_TELEMETRY_OPTOUT: 1 POWERSHELL_TELEMETRY_OPTOUT: 1
steps: steps:
- uses: actions/checkout@main - uses: actions/checkout@main
# TODO: Remove this once the default Python is upgraded from 3.9: https://github.com/actions/runner-images/blob/main/images/windows/Windows2025-Readme.md#language-and-runtime
- uses: actions/setup-python@main
with:
python-version: '3.x'
- name: Lint - name: Lint
run: python xenia-build.py lint --all run: python xenia-build.py lint --all
@@ -70,6 +74,10 @@ jobs:
fetch-depth: 0 fetch-depth: 0
- name: Setup - name: Setup
run: git submodule update --init --depth=1 -j $env:NUMBER_OF_PROCESSORS (Select-String -CaseSensitive '(?<=path = )(?!third_party\/(FidelityFX-(CAS|FSR)|premake-(androidndk|cmake|export-compile-commands))).+' .gitmodules).Matches.Value run: git submodule update --init --depth=1 -j $env:NUMBER_OF_PROCESSORS (Select-String -CaseSensitive '(?<=path = )(?!third_party\/(FidelityFX-(CAS|FSR)|premake-(androidndk|cmake|export-compile-commands))).+' .gitmodules).Matches.Value
# TODO: Remove this once the default Python is upgraded from 3.9: https://github.com/actions/runner-images/blob/main/images/windows/Windows2025-Readme.md#language-and-runtime
- uses: actions/setup-python@main
with:
python-version: '3.x'
- name: Build - name: Build
run: python xenia-build.py build --config=Release --target=src\xenia-app run: python xenia-build.py build --config=Release --target=src\xenia-app
- name: Prepare artifacts - name: Prepare artifacts

View File

@@ -12,7 +12,7 @@ drivers.
* [Visual Studio 2022](https://www.visualstudio.com/downloads/) * [Visual Studio 2022](https://www.visualstudio.com/downloads/)
* CMake 3.10+ (or C++ CMake tools for Windows) * 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) * Windows 11 SDK version 10.0.22000.0 (for Visual Studio 2022, this or any newer version)
* [Python 3.9+ 64-bit](https://www.python.org/downloads/) * [Python 3.10+ 64-bit](https://www.python.org/downloads/)
* Ensure Python is in PATH. * Ensure Python is in PATH.
``` ```

2
xb.bat
View File

@@ -10,7 +10,7 @@ REM ============================================================================
CALL :check_python CALL :check_python
IF %_RESULT% NEQ 0 ( IF %_RESULT% NEQ 0 (
ECHO. ECHO.
ECHO Python 3.9+ must be installed and on PATH: ECHO Python 3.10+ must be installed and on PATH:
ECHO https://www.python.org/ ECHO https://www.python.org/
GOTO :eof GOTO :eof
) )

2
xb.ps1
View File

@@ -9,7 +9,7 @@ foreach ($pythonExecutable in $pythonExecutables) {
} }
# Neither found, error and exit # Neither found, error and exit
if (!$pythonPath) { if (!$pythonPath) {
Throw "ERROR: Python 3.9+ 64-bit must be installed and on PATH:`nhttps://www.python.org/" Throw "ERROR: Python 3.10+ 64-bit must be installed and on PATH:`nhttps://www.python.org/"
} }
& $pythonPath "$($PSScriptRoot)/xenia-build.py" $args & $pythonPath "$($PSScriptRoot)/xenia-build.py" $args

View File

@@ -151,7 +151,7 @@ def main():
print("WARNING: The source tree is unversioned. Version info will be omitted from all binaries!\n") print("WARNING: The source tree is unversioned. Version info will be omitted from all binaries!\n")
# Check python version. # Check python version.
python_minimum_ver = 3,9 python_minimum_ver = 3,10
if not sys.version_info[:2] >= (python_minimum_ver[0], python_minimum_ver[1]) or not sys.maxsize > 2**32: if not sys.version_info[:2] >= (python_minimum_ver[0], python_minimum_ver[1]) or not sys.maxsize > 2**32:
print(f"ERROR: Python {python_minimum_ver[0]}.{python_minimum_ver[1]}+ 64-bit must be installed and on PATH") print(f"ERROR: Python {python_minimum_ver[0]}.{python_minimum_ver[1]}+ 64-bit must be installed and on PATH")
sys.exit(1) sys.exit(1)