Skip to content

Commit 42919ee

Browse files
Steelskinmhegazy
andauthored
[6.2] Update to Python 3.10 and package it. (#1066)
This cherry-picks the following PRs: * #983 * #1003 * #1013 * #1057 Python 3.10 is embedded into the installer for 6.2 since swiftlang/swift-installer-scripts#491 Co-authored-by: Mohamed Hegazy <[email protected]>
1 parent 70d374b commit 42919ee

File tree

3 files changed

+278
-59
lines changed

3 files changed

+278
-59
lines changed

.github/workflows/build-toolchain.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,8 @@ jobs:
221221
windows_x64_build_runner: ${{ steps.context.outputs.windows_x64_build_runner }}
222222
windows_x64_compilers_runner: ${{ steps.context.outputs.windows_x64_compilers_runner }}
223223
mac_build_runner: ${{ steps.context.outputs.mac_build_runner }}
224+
python_version: ${{ steps.context.outputs.python_version }}
225+
python_download_locations: ${{ steps.context.outputs.python_download_locations }}
224226
windows_arm64_build_matrix: ${{ steps.setup-matrix.outputs.windows_arm64_build_matrix }}
225227
windows_arm64_host_matrix: ${{ steps.setup-matrix.outputs.windows_arm64_host_matrix }}
226228
windows_arm64_target_matrix: ${{ steps.setup-matrix.outputs.windows_arm64_target_matrix }}
@@ -233,6 +235,38 @@ jobs:
233235
steps:
234236
- id: context
235237
name: Generate Build Context
238+
env:
239+
PYTHON_DOWNLOAD_LOCATIONS: >-
240+
{
241+
"3.9.10": {
242+
"AMD64": {
243+
"URL": "https://www.nuget.org/api/v2/package/python/3.9.10",
244+
"SHA256": "ac43b491e9488ac926ed31c5594f0c9409a21ecbaf99dc7a93f8c7b24cf85867"
245+
},
246+
"ARM64": {
247+
"URL": "https://www.nuget.org/api/v2/package/pythonarm64/3.9.10",
248+
"SHA256": "429ada77e7f30e4bd8ff22953a1f35f98b2728e84c9b1d006712561785641f69"
249+
}
250+
},
251+
"3.10.1": {
252+
"AMD64": {
253+
"URL": "https://www.nuget.org/api/v2/package/python/3.10.1",
254+
"SHA256": "987a0e446d68900f58297bc47dc7a235ee4640a49dace58bc9f573797d3a8b33"
255+
},
256+
"AMD64_Embedded": {
257+
"URL": "https://www.python.org/ftp/python/3.10.1/python-3.10.1-embed-amd64.zip",
258+
"SHA256": "502670dcdff0083847abf6a33f30be666594e7e5201cd6fccd4a523b577403de"
259+
},
260+
"ARM64": {
261+
"URL": "https://www.nuget.org/api/v2/package/pythonarm64/3.10.1",
262+
"SHA256": "16becfccedf1269ff0b8695a13c64fac2102a524d66cecf69a8f9229a43b10d3"
263+
},
264+
"ARM64_Embedded": {
265+
"URL": "https://www.python.org/ftp/python/3.10.1/python-3.10.1-embed-arm64.zip",
266+
"SHA256": "1f9e215fe4e8f22a8e8fba1859efb1426437044fb3103ce85794630e3b511bc2"
267+
}
268+
}
269+
}
236270
run: |
237271
# TODO(compnerd) can we make this more silent?
238272
sudo DEBIAN_FRONTEND=noninteractive apt-get -qq update -yq
@@ -376,6 +410,12 @@ jobs:
376410
echo ANDROID_NDK_VERSION=r27c >> ${GITHUB_OUTPUT}
377411
echo ANDROID_CLANG_VERSION=18 >> ${GITHUB_OUTPUT}
378412
413+
# Set Python version used in the build
414+
echo python_version=3.10.1 >> ${GITHUB_OUTPUT}
415+
416+
# Set Python download locations
417+
echo python_download_locations=$(jq -c '.' <<< "${PYTHON_DOWNLOAD_LOCATIONS}") >> ${GITHUB_OUTPUT}
418+
379419
- uses: actions/upload-artifact@v4
380420
if: inputs.create_snapshot == true
381421
with:
@@ -834,6 +874,8 @@ jobs:
834874
default_build_runner: ${{ needs.context.outputs[format('windows_{0}_build_runner', needs.context.outputs.windows_build_cpu)] }}
835875
compilers_build_runner: ${{ needs.context.outputs[format('windows_{0}_compilers_runner', needs.context.outputs.windows_build_cpu)] }}
836876
build_android: ${{ inputs.build_android }}
877+
python_version: ${{ needs.context.outputs.python_version }}
878+
python_download_locations: ${{ needs.context.outputs.python_download_locations }}
837879
secrets:
838880
SYMBOL_SERVER_PAT: ${{ secrets.SYMBOL_SERVER_PAT }}
839881
CERTIFICATE: ${{ secrets.CERTIFICATE }}
@@ -909,6 +951,8 @@ jobs:
909951
swift_tag: ${{ needs.context.outputs.swift_tag }}
910952
default_build_runner: ${{ needs.context.outputs.mac_build_runner }}
911953
compilers_build_runner: ${{ needs.context.outputs.mac_build_runner }}
954+
python_version: ${{ needs.context.outputs.python_version }}
955+
python_download_locations: ${{ needs.context.outputs.python_download_locations }}
912956
secrets:
913957
SYMBOL_SERVER_PAT: ${{ secrets.SYMBOL_SERVER_PAT }}
914958
CERTIFICATE: ${{ secrets.CERTIFICATE }}

0 commit comments

Comments
 (0)