Skip to content

Commit 0970801

Browse files
committed
verify: probe for TCL path on Windows
1 parent 04f86d5 commit 0970801

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

src/verify_distribution.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,23 @@
1313
"/usr/share/terminfo",
1414
]
1515

16+
TCL_PATHS = [
17+
# POSIX
18+
("lib", "tcl", "tcl"),
19+
# Windows.
20+
("tcl",),
21+
]
22+
1623
HERE = os.path.dirname(sys.executable)
1724
INSTALL_ROOT = os.path.dirname(HERE)
1825

1926
# Need to set TCL_LIBRARY so local tcl/tk files get picked up.
20-
os.environ["TCL_LIBRARY"] = os.path.join(INSTALL_ROOT, "lib", "tcl", "tcl")
27+
for parts in TCL_PATHS:
28+
candidate = os.path.join(INSTALL_ROOT, *parts)
29+
30+
if os.path.exists(candidate):
31+
os.environ["TCL_LIBRARY"] = candidate
32+
break
2133

2234
# Need to set TERMINFO_DIRS so terminfo database can be located.
2335
if "TERMINFO_DIRS" not in os.environ:

0 commit comments

Comments
 (0)