From f41a81d0e1cf02b68e008b41e9573fe032aad397 Mon Sep 17 00:00:00 2001 From: Steve Dower Date: Mon, 11 May 2026 16:19:21 +0100 Subject: [PATCH 1/2] Update runtime to 3.14.5 --- .github/workflows/build.yml | 8 ++++---- _msbuild.py | 2 +- ci/release.yml | 8 ++++---- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 86717e2..24f4aec 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -43,20 +43,20 @@ jobs: - name: Set up NuGet uses: nuget/setup-nuget@b26b823c478ee115be5c9403e62c90b0bf943843 # v3.1.0 - - name: Set up Python 3.14.4 + - name: Set up Python 3.14.5 run: | - nuget install python -Version 3.14.4 -x -o . + nuget install python -Version 3.14.5 -x -o . $py = Get-Item python\tools Write-Host "Adding $py to PATH" "$py" | Out-File $env:GITHUB_PATH -Encoding UTF8 -Append working-directory: ${{ runner.temp }} - - name: Check Python version is 3.14.4 + - name: Check Python version is 3.14.5 run: > python -c "import sys; print(sys.version); print(sys.executable); - sys.exit(0 if sys.version_info[:5] == (3, 14, 4, 'final', 0) else 1)" + sys.exit(0 if sys.version_info[:5] == (3, 14, 5, 'final', 0) else 1)" - name: Install build dependencies run: python -m pip install "pymsbuild==1.2.2" diff --git a/_msbuild.py b/_msbuild.py index 62bbe27..b9e544b 100644 --- a/_msbuild.py +++ b/_msbuild.py @@ -4,7 +4,7 @@ DLL_NAME = "python314" -EMBED_URL = "https://www.python.org/ftp/python/3.14.3/python-3.14.3-embed-amd64.zip" +EMBED_URL = "https://www.python.org/ftp/python/3.14.3/python-3.14.5-embed-amd64.zip" def can_embed(tag): """Return False if tag doesn't match DLL_NAME and EMBED_URL. diff --git a/ci/release.yml b/ci/release.yml index 9bd1b9d..25b173b 100644 --- a/ci/release.yml +++ b/ci/release.yml @@ -95,19 +95,19 @@ stages: displayName: 'Install Nuget' - powershell: | - nuget install python -Version 3.14.4 -x -noninteractive -o host_python + nuget install python -Version 3.14.5 -x -noninteractive -o host_python $py = Get-Item host_python\python\tools Write-Host "Adding $py to PATH" Write-Host "##vso[task.prependpath]$py" - displayName: Set up Python 3.14.4 + displayName: Set up Python 3.14.5 workingDirectory: $(Build.BinariesDirectory) - powershell: > python -c "import sys; print(sys.version); print(sys.executable); - sys.exit(0 if sys.version_info[:5] == (3, 14, 4, 'final', 0) else 1)" - displayName: Check Python version is 3.14.4 + sys.exit(0 if sys.version_info[:5] == (3, 14, 5, 'final', 0) else 1)" + displayName: Check Python version is 3.14.5 - powershell: | python -m pip install "pymsbuild==1.2.2" From e7660d03243b087f52e44dd9e2a520de0af63590 Mon Sep 17 00:00:00 2001 From: Steve Dower Date: Mon, 11 May 2026 16:35:23 +0100 Subject: [PATCH 2/2] Make version variable --- _msbuild.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/_msbuild.py b/_msbuild.py index b9e544b..7920d9e 100644 --- a/_msbuild.py +++ b/_msbuild.py @@ -1,16 +1,20 @@ import os +import sys from pymsbuild import * from pymsbuild.dllpack import * -DLL_NAME = "python314" -EMBED_URL = "https://www.python.org/ftp/python/3.14.3/python-3.14.5-embed-amd64.zip" +DLL_NAME = "python{0.major}{0.minor}".format(sys.version_info) +VER_NUM = "{0.major}.{0.minor}.{0.micro}".format(sys.version_info) +EMBED_URL = f"https://www.python.org/ftp/python/{VER_NUM}/python-{VER_NUM}-embed-amd64.zip" def can_embed(tag): """Return False if tag doesn't match DLL_NAME and EMBED_URL. This is used for validation at build time, we don't currently handle requesting a different build target.""" - return tag == "cp314-cp314-win_amd64" + return tag == "cp{0.major}{0.minor}-cp{0.major}{0.minor}-win_amd64".format( + sys.version_info + ) METADATA = { @@ -454,6 +458,7 @@ def init_PACKAGE(tag=None): from zipfile import ZipFile package = tmpdir / tag / "package.zip" package.parent.mkdir(exist_ok=True, parents=True) + print("Downloading", EMBED_URL) urlretrieve(EMBED_URL, package) with ZipFile(package) as zf: for f in [*embed_files, *runtime_files]: