Skip to content

Commit

Permalink
Merge pull request #64 from ActiveState/2.7.18.10_VCRuntime
Browse files Browse the repository at this point in the history
Move VCRuntime from DLLs folder to Main
  • Loading branch information
rickprice authored Sep 6, 2024
2 parents 61ea7f4 + 0c40569 commit 3e06fbb
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions PC/layout/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
TCLTK_DIRS_ONLY = FileNameSet("tkinter", "turtledemo")
TCLTK_FILES_ONLY = FileNameSet("turtle.py")

EXCLUDE_FROM_PYDS = FileStemSet("python*", "pyshellext")
EXCLUDE_FROM_PYDS = FileStemSet("python*", "pyshellext", "vcruntime*")
EXCLUDE_FROM_LIB = FileNameSet("*.pyc", "__pycache__", "*.pickle")
EXCLUDE_FROM_PACKAGED_LIB = FileNameSet("readme.txt")
EXCLUDE_FROM_COMPILE = FileNameSet("badsyntax_*", "bad_*")
Expand Down Expand Up @@ -142,6 +142,14 @@ def in_build(f, dest="", new_name=None):
for item in in_build(PYTHON_DLL_NAME):
yield item

# Explicitly move vcruntime.dlls to the Main directory so they are available at startup
found_any = False
for dest, src in rglob(ns.build, "vcruntime*.dll"):
found_any = True
yield dest, src
if not found_any:
log_error("Failed to locate vcruntime DLL in the build.")

yield "LICENSE", "LICENSE"

for dest, src in rglob(ns.build, ("*.pyd", "*.dll")):
Expand All @@ -153,7 +161,9 @@ def in_build(f, dest="", new_name=None):
continue
if src in TCLTK_PYDS_ONLY and not ns.include_tcltk:
continue

# Explicitly remove files containing vcruntime from the DLLs subdirectory.
if "vcruntime" in src:
continue
for item in in_build(os.path.basename(src), dest="" if ns.flat_dlls else "DLLs/"):
yield item

Expand Down

0 comments on commit 3e06fbb

Please sign in to comment.