(python, scriptfile, outdir)
| 160 | |
| 161 | |
| 162 | def freeze(python, scriptfile, outdir): |
| 163 | if not MAKE: |
| 164 | raise UnsupportedError('make') |
| 165 | |
| 166 | print(f'freezing {scriptfile}...') |
| 167 | os.makedirs(outdir, exist_ok=True) |
| 168 | # Use -E to ignore PYTHONSAFEPATH |
| 169 | _run_quiet([python, '-E', FREEZE, '-o', outdir, scriptfile], cwd=outdir) |
| 170 | _run_quiet([MAKE], cwd=os.path.dirname(scriptfile)) |
| 171 | |
| 172 | name = os.path.basename(scriptfile).rpartition('.')[0] |
| 173 | executable = os.path.join(outdir, name) |
| 174 | return executable |
| 175 | |
| 176 | |
| 177 | def run(executable): |
nothing calls this directly
no test coverage detected
searching dependent graphs…