Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
11 changes: 8 additions & 3 deletions _msbuild.py
Original file line number Diff line number Diff line change
@@ -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.3-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 = {
Expand Down Expand Up @@ -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]:
Expand Down
8 changes: 4 additions & 4 deletions ci/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Loading