Replace `#!usr/bin/env @python@` with `#!usr/bin/env python`
This Pull request:
Replace the shebang with python for the python scripts under main/python
Changes or fixes:
Use /usr/bin/env python as it is done everywhere else in ROOT (in some places
it's python3 instead of python). Avoid having to
deal with the length of the shebang being too long when using a python installed
in deep locations (like in deep folder paths in cvmfs).
I believe this shouldn't change anything in most setups except in those where
ROOT was built with one python and then the first python found in PATH is a
different one, but that is a weird setup (?). Alternatively it may be possible
to substitute only the name of the python executable, like python3.11, but
then it has to be in PATH. but I think this is the cleanest way and the cases
where this wouldn't work would be related to issues in the environment rather
than ROOT itself.
Checklist:
- [x] tested changes locally
- [ ] updated the docs (if necessary)
Test Results
10 files 10 suites 2d 5h 47m 24s :stopwatch: 2 636 tests 2 556 :white_check_mark: 0 :zzz: 80 :x: 25 131 runs 25 051 :white_check_mark: 0 :zzz: 80 :x:
For more details on these failures, see this check.
Results for commit 9967ce75.
:recycle: This comment has been updated with latest results.
TBH, I'm a bit reluctant with this PR. Not sure what the benefit is and what it solves. At least it doesn't work everywhere... And maybe @Axel-Naumann or @vepadulano might give their opinion about it?
python does not exist as an alias to python3 on all platforms we support. It might be that all platforms have python3 though. So maybe use that? But we should only do this after we have removed support for Python 2.
On Windows there is only Python.exe
Okay so we need to configure this, but we should probably use the base name as suggested by @jmcarcell
Closing this PR, as the author didn't follow up on the comments, nor made sure it works on all platforms (Windows didn't work).
@jmcarcell, please feel free to re-open if you still want to follow up here! Thanks.