Add a python2_action() template and use it in :histograms_xml.
As one of the first steps in making the build work with Python 3, we will need a way to indicate which actions still require Python 2 to run (most work fine under Python 3 already, but some do not). This CL introduces a python2_action() template, which works just like a regular action() rule, but ensures that the script runs under Python 2 instead of whichever Python version you happen to be running. This CL also switches //tools/metrics:histograms_xml to use it (because it seems to need it) as a proof that it works correctly and does not regress in a normal (python 2) build. Bug: 941669, 1118214 Change-Id: I98fbc073cf9443acece3caaae2ed35f9d60c38e0 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2363655 Commit-Queue: Dirk Pranke <dpranke@google.com> Reviewed-by:Andrew Grieve <agrieve@chromium.org> Reviewed-by:
Ilya Sherman <isherman@chromium.org> Cr-Commit-Position: refs/heads/master@{#799909}
Showing
build/util/python2_action.py
0 → 100644
Please register or sign in to comment