Description
Currently all Python scripts in this repository use shebang #!/usr/bin/env python
.
The problem
This is bad because python
means default system Python which is Python 3 for Arch and scripts don't work.
Other distributions are going to follow it sooner or later because Python 2 won't be maintained since 2020, for an example: Fedora proposal. Also many distributions like Ubuntu, OpenSUSE, Fedora want to ship only with Python 3 preinstalled.
Behaviour on different platforms
I've checked many Linux distributions and all of them had python2
, python2.7
, python3
, python3.X
(X differs based on the version).
All I know about OSX is it doesn't have python2
but has python2.7
, it would be great if somebody could reply with list of all variants.
MSYS2 (aka windows-gnu) does it just like Linux, no idea about windows-msvc (does #!/usr/bin/env
even work there?).
Possible solutions
- Use
#!/usr/bin/env python2
; probably would work everywhere (sometimes it's not installed but available in repo) but note that, Python 2 is almost dead already. - Port scrips to Python 3; I have no idea about OSX and MSVC, should work everywhere else.
- RIIR; everything will work on every supported platform, it's win-win but takes more effort.
cc no idea