Skip to content

Commit a4cb417

Browse files
committed
Use Visual Studio 2022 for builds instead of 2019
1 parent 55787ea commit a4cb417

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

.github/workflows/windows.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,9 @@ jobs:
6767

6868
needs: pythonbuild
6969
runs-on: 'windows-2019'
70+
env:
71+
# Workaround for https://github.com/actions/runner-images/issues/10819
72+
VCToolsRedistDir: 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Redist\MSVC\14.29.30156'
7073
steps:
7174
- uses: actions/checkout@v4
7275
with:
@@ -96,8 +99,7 @@ jobs:
9699
- name: Build
97100
shell: cmd
98101
run: |
99-
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\${{ matrix.vcvars }}"
100-
py.exe -3.9 build-windows.py --python ${{ matrix.py }} --sh c:\cygwin\bin\sh.exe --options ${{ matrix.options }}
102+
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\${{ matrix.vcvars }}"isu py.exe -3.9 build-windows.py --python ${{ matrix.py }} --sh c:\cygwin\bin\sh.exe --options ${{ matrix.options }}
101103
102104
- name: Validate Distribution
103105
run: |

cpython-windows/build.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1424,6 +1424,16 @@ def build_cpython(
14241424
# The python.props file keys off MSBUILD, so it needs to be set.
14251425
os.environ["MSBUILD"] = str(msbuild)
14261426

1427+
# Workaround for https://github.com/actions/runner-images/issues/10819
1428+
if not os.environ.get("VCToolsRedistDir"):
1429+
os.environ["VCToolsRedistDir"] = os.path.join(
1430+
os.environ["VCINSTALLDIR"],
1431+
"Redist",
1432+
"MSVC",
1433+
os.environ["VCToolsVersion"],
1434+
"",
1435+
)
1436+
14271437
bzip2_archive = download_entry("bzip2", BUILD)
14281438
sqlite_archive = download_entry("sqlite", BUILD)
14291439
tk_bin_archive = download_entry(

0 commit comments

Comments
 (0)