Repository navigation
Commit 3732168
fixup.py: handle "#!" lines that can't hold the tree's location
A "#!" line can't name an interpreter whose path has spaces, and its
length is limited. fixup.py wrote the tree's location into the installed
Python scripts regardless, so `idle3`, `pydoc3`, `python-config.py` and
(on macOS) `python3-config` didn't run from such a tree.
When a plain "#!" line wouldn't work, make the script run through
/bin/sh, with a first statement that the shell reads as `exec` of the
interpreter and Python reads as a string. Other scripts keep an ordinary
"#!" line.
This is the approach of #39, moved to fixup.py.
Co-authored-by: Jannis Leidel <jannis@leidel.info>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>1 parent 99d49aa commit 3732168
2 files changed
Lines changed: 25 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | | - | |
| 56 | + | |
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
26 | 49 | | |
27 | 50 | | |
28 | 51 | | |
| |||
57 | 80 | | |
58 | 81 | | |
59 | 82 | | |
| 83 | + | |
60 | 84 | | |
61 | 85 | | |
62 | 86 | | |
| |||
0 commit comments