Commit Graph

1 Commits

Author SHA1 Message Date
Glauber Costa
3869628429 automatically relocate python scripts
Given a python script at $DIR/script.py, this copies the script to
$DIR/libexec/script.py.bin, fixes its shebang to use /usr/bin/env instead
of an absolute path for the interpreter and replaces the original script
with a thunk that calls into that script.

PYTHONPATH is adjusted so that the original directory containing the script
can also serve as a source of modules, as would be originally intended.

Signed-off-by: Glauber Costa <glauber@scylladb.com>
2019-02-04 18:02:39 -05:00