@@ -914,15 +914,6 @@ jobs:
914914 compilers :
915915 needs : [libxml2, build_tools, cmark_gfm, early_swift_driver]
916916 runs-on : ${{ inputs.compilers_build_runner }}
917-
918- env :
919- # This will grab the latest Python 3.9 version available for setup-python. It is necessary to
920- # specify in this manner for Mac where actions/setup-python does not have version 3.9.10.
921- # Once the Python version is upgraded to 3.12, these should be kept in sync.
922- PYTHON_VERSION_MACOS : 3.9
923- # Must be a full version string from https://www.nuget.org/packages/pythonarm64
924- PYTHON_VERSION_WINDOWS : 3.9.10
925-
926917 strategy :
927918 fail-fast : false
928919 matrix : ${{ fromJSON(inputs.compilers_matrix) }}
@@ -1012,38 +1003,38 @@ jobs:
10121003 path : ${{ github.workspace }}/SourceCache/swift-corelibs-libdispatch
10131004 show-progress : false
10141005
1015- - name : Install Python ${{ env.PYTHON_VERSION_MACOS }} (Host)
1006+ - name : Install Python ${{ inputs.python_version }} (Host)
10161007 if : matrix.os == 'Darwin'
10171008 uses : actions/setup-python@v5
10181009 with :
1019- python-version : ' ${{ env.PYTHON_VERSION_MACOS }}'
1010+ python-version : ' ${{ inputs.python_version }}'
10201011
1021- - name : Install Python ${{ env.PYTHON_VERSION_WINDOWS }} (Host)
1012+ - name : Install Python ${{ inputs.python_version }} (Host)
10221013 if : matrix.os == 'Windows' && (matrix.arch == 'amd64' || inputs.build_arch == 'amd64')
10231014 uses : actions/setup-python@v5
10241015 id : python
10251016 with :
1026- python-version : ' ${{ env.PYTHON_VERSION_WINDOWS }}'
1017+ python-version : ' ${{ inputs.python_version }}'
10271018 architecture : x64
10281019
10291020 - uses : nuget/setup-nuget@v2
10301021 if : inputs.build_os == 'Windows' && (matrix.arch == 'arm64' || inputs.build_arch == 'arm64')
10311022
10321023 # TODO(lxbndr) use actions/cache to improve this step timings
1033- - name : Install Python ${{ env.PYTHON_VERSION_WINDOWS }} (Windows arm64)
1024+ - name : Install Python ${{ inputs.python_version }} (Windows arm64)
10341025 if : inputs.build_os == 'Windows' && (matrix.arch == 'arm64' || inputs.build_arch == 'arm64')
10351026 run : |
10361027 $NugetSources=[string](nuget Sources List -Format short)
10371028 if (-Not ($NugetSources.contains("api.nuget.org"))) {
10381029 nuget sources Add -Name api.nuget.org -Source https://api.nuget.org/v3/index.json -NonInteractive
10391030 }
1040- nuget install pythonarm64 -Version ${{ env.PYTHON_VERSION_WINDOWS }}
1031+ nuget install pythonarm64 -Version ${{ inputs.python_version }}
10411032
10421033 - name : Export Python Location (Windows)
10431034 if : inputs.build_os == 'Windows'
10441035 run : |
10451036 echo "PYTHON_LOCATION_amd64=$env:pythonLocation" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
1046- echo "PYTHON_LOCATION_arm64=${{ github.workspace }}\pythonarm64.${{ env.PYTHON_VERSION_WINDOWS }}\tools" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
1037+ echo "PYTHON_LOCATION_arm64=${{ github.workspace }}\pythonarm64.${{ inputs.python_version }}\tools" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
10471038
10481039 - uses : nttld/setup-ndk@v1
10491040 if : matrix.os == 'Android'
@@ -1063,14 +1054,14 @@ jobs:
10631054 if ( "${{ matrix.os }}" -eq "Windows" ) {
10641055 $CLANG_LOCATION = cygpath -m $(Split-Path (Get-Command swiftc).Source)
10651056 $SDKROOT = cygpath -m ${env:SDKROOT}
1066- $LIBPYTHON_PATH = "${env:PYTHON_LOCATION_${{ matrix.arch }}}/libs/python39 .lib"
1057+ $LIBPYTHON_PATH = "${env:PYTHON_LOCATION_${{ matrix.arch }}}/libs/python310 .lib"
10671058 $PYTHON_INCLUDE_DIR = "${env:PYTHON_LOCATION_${{ matrix.arch }}}/include"
10681059 $PYTHON_BINARY="python.exe"
10691060 } elseif ( "${{ matrix.os }}" -eq "Darwin" ) {
10701061 $CLANG_LOCATION = "${env:HOME}/Library/Developer/Toolchains/swift-${{ env.PINNED_BOOTSTRAP_TOOLCHAIN_VERSION }}-RELEASE.xctoolchain/usr/bin"
10711062 $SDKROOT = xcrun --sdk macosx --show-sdk-path
1072- $LIBPYTHON_PATH = "${env:pythonLocation}/lib/python3.9 /config-3.9 -darwin/libpython3.9 .a"
1073- $PYTHON_INCLUDE_DIR = "${env:pythonLocation}/include/python3.9 "
1063+ $LIBPYTHON_PATH = "${env:pythonLocation}/lib/python3.10 /config-3.10 -darwin/libpython3.10 .a"
1064+ $PYTHON_INCLUDE_DIR = "${env:pythonLocation}/include/python3.10 "
10741065 $PYTHON_BINARY="python3"
10751066 }
10761067
0 commit comments