(ns)
| 125 | |
| 126 | |
| 127 | def 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) |
no test coverage detected
searching dependent graphs…