Change "python" to "python2" in shebang lines and build scripts
Submitted by jus..@..r.name
Assigned to SyncEvolution Community
Link to original bug (#107014)
Description
Created attachment 140297 Patch against syncevolution-1.5.3 replacing python by python2
Syncevolution relies on python == python2. This causes problems at least on Arch Linux. With Python 2 EOL drawing closer, this will become even more of an issue.
PEP 394 states (https://www.python.org/dev/peps/pep-0394/):
- In order to tolerate differences across platforms, all new code that needs to invoke the Python interpreter should not specify python, but rather should specify either python2 or python3... This distinction should be made in shebangs...
- One exception to this is scripts that are deliberately written to be source compatible with both Python 2.x and 3.x. Such scripts may continue to use python on their shebang line.
SyncEvolution is not "new code", so it does not technically violate this PEP. Nevertheless, it is clearly best practice to explicitly specify the Python version and use "python" only for scripts compatible with both python 2 and python3.
FWIW, I attach the patch I ship with the syncevolution Arch package I maintain.
Patch 140297, "Patch against syncevolution-1.5.3 replacing python by python2":
syncevolution-1.5.3-python2.patch