File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import os
2+ import sys
23from pymsbuild import *
34from pymsbuild .dllpack import *
45
56
6- DLL_NAME = "python314"
7- EMBED_URL = "https://www.python.org/ftp/python/3.14.3/python-3.14.5-embed-amd64.zip"
7+ DLL_NAME = "python{0.major}{0.minor}" .format (sys .version_info )
8+ VER_NUM = "{0.major}.{0.minor}.{0.micro}" .format (sys .version_info )
9+ EMBED_URL = f"https://www.python.org/ftp/python/{ VER_NUM } /python-{ VER_NUM } -embed-amd64.zip"
810
911def can_embed (tag ):
1012 """Return False if tag doesn't match DLL_NAME and EMBED_URL.
1113 This is used for validation at build time, we don't currently handle
1214 requesting a different build target."""
13- return tag == "cp314-cp314-win_amd64"
15+ return tag == "cp{0.major}{0.minor}-cp{0.major}{0.minor}-win_amd64" .format (
16+ sys .version_info
17+ )
1418
1519
1620METADATA = {
@@ -454,6 +458,7 @@ def init_PACKAGE(tag=None):
454458 from zipfile import ZipFile
455459 package = tmpdir / tag / "package.zip"
456460 package .parent .mkdir (exist_ok = True , parents = True )
461+ print ("Downloading" , EMBED_URL )
457462 urlretrieve (EMBED_URL , package )
458463 with ZipFile (package ) as zf :
459464 for f in [* embed_files , * runtime_files ]:
You can’t perform that action at this time.
0 commit comments