Skip to content

Commit 3e06fbb

Browse files
authored
Merge pull request #64 from ActiveState/2.7.18.10_VCRuntime
Move VCRuntime from DLLs folder to Main
2 parents 61ea7f4 + 0c40569 commit 3e06fbb

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

PC/layout/main.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
TCLTK_DIRS_ONLY = FileNameSet("tkinter", "turtledemo")
3737
TCLTK_FILES_ONLY = FileNameSet("turtle.py")
3838

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

145+
# Explicitly move vcruntime.dlls to the Main directory so they are available at startup
146+
found_any = False
147+
for dest, src in rglob(ns.build, "vcruntime*.dll"):
148+
found_any = True
149+
yield dest, src
150+
if not found_any:
151+
log_error("Failed to locate vcruntime DLL in the build.")
152+
145153
yield "LICENSE", "LICENSE"
146154

147155
for dest, src in rglob(ns.build, ("*.pyd", "*.dll")):
@@ -153,7 +161,9 @@ def in_build(f, dest="", new_name=None):
153161
continue
154162
if src in TCLTK_PYDS_ONLY and not ns.include_tcltk:
155163
continue
156-
164+
# Explicitly remove files containing vcruntime from the DLLs subdirectory.
165+
if "vcruntime" in src:
166+
continue
157167
for item in in_build(os.path.basename(src), dest="" if ns.flat_dlls else "DLLs/"):
158168
yield item
159169

0 commit comments

Comments
 (0)