MCPcopy Index your code
hub / github.com/python/cpython / get_tcltk_lib

Function get_tcltk_lib

PC/layout/main.py:108–124  ·  view source on GitHub ↗
(ns)

Source from the content-addressed store, hash-verified

106
107
108def get_tcltk_lib(ns):
109 if not ns.include_tcltk:
110 return
111
112 tcl_lib = os.getenv("TCL_LIBRARY")
113 if not tcl_lib or not os.path.isdir(tcl_lib):
114 try:
115 with open(ns.build / "TCL_LIBRARY.env", "r", encoding="utf-8-sig") as f:
116 tcl_lib = f.read().strip()
117 except FileNotFoundError:
118 pass
119 if not tcl_lib or not os.path.isdir(tcl_lib):
120 log_warning("Failed to find TCL_LIBRARY")
121 return
122
123 for dest, src in rglob(Path(tcl_lib).parent, "**/*"):
124 yield "tcl/{}".format(dest), src
125
126
127def get_layout(ns):

Callers 1

get_layoutFunction · 0.85

Calls 8

PathClass · 0.90
log_warningFunction · 0.85
rglobFunction · 0.85
openFunction · 0.50
isdirMethod · 0.45
stripMethod · 0.45
readMethod · 0.45
formatMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…