Update depot_tools to refer to python2 explicitly |
||||||
Issue descriptionAccording to PEP 394 (https://www.python.org/dev/peps/pep-0394/) scripts which only work under Python 2 should explicitly refer to the python2 binary instead of the python binary as some distributions alias this to python3.
,
Nov 6 2017
All of our scripts run on all platforms, and that PEP explicitly excludes windows, saying that the problem is "too complex to handle". Robbie, do you know if amending our shebang lines to all be "python2" would work on our *nix distributions, and would work on our depot_tools hermetic python installs?
,
Nov 6 2017
The "too complex to handle" portion is regarding being able to execute the scripts directly (`foo.py` instead of `python foo.py`), since Windows doesn't natively support shebangs, instead relying on a file-type=>application mapping) This was solved for Windows by having a `py` launcher command that will parse the shebang line and run the correct python in accordance with PEP394. But if you're running explicitly with `python`, as depot_tools does, PEP394 is the chosen reasonable solution to ensure portability. I did discover that the python.org Windows downloads do not include aliases for python2/python3, but those are easy enough to add. (It looks like depot_tools already adds a `python` alias on Windows)
,
Nov 7 2017
Welp, we'll see if this works :) https://chromium-review.googlesource.com/#/c/chromium/tools/depot_tools/+/756208
,
Nov 9 2017
FWIW, this is what I'm presently using: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/746142
,
Nov 16 2017
Issue 782495 has been merged into this issue.
,
Mar 16 2018
,
May 6 2018
i'm not sure if this the rigth bug to post this, but, seems need also edit these files
build/download_nacl_toolchains.py
build/linux/unbundle/remove_bundled_libraries.py
build/linux/unbundle/replace_gn_files.py
tools/clang/scripts/update.py
tools/gn/bootstrap/bootstrap.py
third_party/dom_distiller_js/protoc_plugins/*.py
third_party/ffmpeg/chromium/scripts/build_ffmpeg.py
third_party/ffmpeg/chromium/scripts/generate_gn.py
this files also point to python instead of python2
greetings
,
May 6 2018
seems all nacl/pnacl (nacl_client) need set also python2 in all scripts
,
Aug 10
Unassigning from myself because I'm on sabbatical.
,
Aug 15
,
Oct 18
|
||||||
►
Sign in to add a comment |
||||||
Comment 1 by jda...@gmail.com
, Oct 31 2017