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

Function get_layout

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

Source from the content-addressed store, hash-verified

125
126
127def get_layout(ns):
128 def in_build(f, dest="", new_name=None, no_lib=False):
129 n, _, x = f.rpartition(".")
130 n = new_name or n
131 src = ns.build / f
132 if ns.debug and src not in REQUIRED_DLLS:
133 if not "_d." in src.name:
134 src = src.parent / (src.stem + "_d" + src.suffix)
135 if "_d." not in f:
136 n += "_d"
137 f = n + "." + x
138 yield dest + n + "." + x, src
139 if ns.include_symbols:
140 pdb = src.with_suffix(".pdb")
141 if pdb.is_file():
142 yield dest + n + ".pdb", pdb
143 if ns.include_dev and not no_lib:
144 lib = src.with_suffix(".lib")
145 if lib.is_file():
146 yield "libs/" + n + ".lib", lib
147
148 source = "python.exe"
149 sourcew = "pythonw.exe"
150 alias = [
151 "python",
152 "python{}".format(VER_MAJOR) if ns.include_alias3 else "",
153 "python{}".format(VER_DOT) if ns.include_alias3x else "",
154 ]
155 aliasw = [
156 "pythonw",
157 "pythonw{}".format(VER_MAJOR) if ns.include_alias3 else "",
158 "pythonw{}".format(VER_DOT) if ns.include_alias3x else "",
159 ]
160 if ns.include_appxmanifest:
161 source = "python_uwp.exe"
162 sourcew = "pythonw_uwp.exe"
163 elif ns.include_freethreaded:
164 source = "python{}t.exe".format(VER_DOT)
165 sourcew = "pythonw{}t.exe".format(VER_DOT)
166 if not ns.include_alias:
167 alias = []
168 aliasw = []
169 alias.extend([
170 "python{}t".format(VER_DOT),
171 "python{}t".format(VER_MAJOR) if ns.include_alias3 else None,
172 ])
173 aliasw.extend([
174 "pythonw{}t".format(VER_DOT),
175 "pythonw{}t".format(VER_MAJOR) if ns.include_alias3 else None,
176 ])
177
178 for a in filter(None, alias):
179 yield from in_build(source, new_name=a)
180 for a in filter(None, aliasw):
181 yield from in_build(sourcew, new_name=a)
182
183 if ns.include_freethreaded:
184 yield from in_build(FREETHREADED_PYTHON_DLL_NAME)

Callers 1

mainFunction · 0.70

Calls 15

in_buildFunction · 0.85
rglobFunction · 0.85
log_errorFunction · 0.85
get_lib_layoutFunction · 0.85
get_tcltk_libFunction · 0.85
get_pip_layoutFunction · 0.85
get_props_layoutFunction · 0.85
get_nuspec_layoutFunction · 0.85
get_appx_layoutFunction · 0.85
filterFunction · 0.50
formatMethod · 0.45
extendMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…