make-dom-distiller-protoc-plugin-call-py2.7.patch 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. From 359b22d3f775afa33cca9e4f8fb57eadd0ec4118 Mon Sep 17 00:00:00 2001
  2. From: Nico Weber <thakis@chromium.org>
  3. Date: Fri, 23 Apr 2021 16:22:19 +0000
  4. Subject: [PATCH] Make dom distiller protoc plugin explicitly call py2.7
  5. With this, chrome builds with when `/usr/bin/env python` is py3.
  6. Bug: 1202134
  7. Change-Id: Ibbd97a1311ccb34d46f266912c871fd0522f9535
  8. Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2848445
  9. Commit-Queue: Nico Weber <thakis@chromium.org>
  10. Commit-Queue: Yaron Friedman <yfriedman@chromium.org>
  11. Commit-Queue: Dirk Pranke <dpranke@google.com>
  12. Auto-Submit: Nico Weber <thakis@chromium.org>
  13. Reviewed-by: Yaron Friedman <yfriedman@chromium.org>
  14. Reviewed-by: Dirk Pranke <dpranke@google.com>
  15. Cr-Commit-Position: refs/heads/master@{#875702}
  16. ---
  17. .../dom_distiller_js/protoc_plugins/json_values_converter.py | 5 ++++-
  18. 1 file changed, 4 insertions(+), 1 deletion(-)
  19. diff --git a/third_party/dom_distiller_js/protoc_plugins/json_values_converter.py b/third_party/dom_distiller_js/protoc_plugins/json_values_converter.py
  20. index e86a88c759fcb..cae1a998c4650 100755
  21. --- a/third_party/dom_distiller_js/protoc_plugins/json_values_converter.py
  22. +++ b/third_party/dom_distiller_js/protoc_plugins/json_values_converter.py
  23. @@ -1,7 +1,10 @@
  24. -#!/usr/bin/env python
  25. +#!/usr/bin/env python2.7
  26. # Copyright 2016 The Chromium Authors. All rights reserved.
  27. # Use of this source code is governed by a BSD-style license that can be
  28. # found in the LICENSE file.
  29. +#
  30. +# TODO(crbug.com/1202134): Switch run line back to just "python"
  31. +# once things are py3-compatible.
  32. """protoc plugin to create C++ reader/writer for JSON-encoded protobufs