Explorar o código

Add a python2 shim under python2-bin/

Similarly to how python3 is available at python-bin/, this will allow
developers to opt-in to a depot_tools provided python2.

Bug: 1109180
Change-Id: I872eaa1289bb477da73373e99f5e6188a87d39dd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2512906
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
Reviewed-by: Dirk Pranke <dpranke@google.com>
Commit-Queue: Henrique Ferreiro <hferreiro@igalia.com>
Henrique Ferreiro %!s(int64=4) %!d(string=hai) anos
pai
achega
26cd974abf
Modificáronse 1 ficheiros con 7 adicións e 0 borrados
  1. 7 0
      python2-bin/python2

+ 7 - 0
python2-bin/python2

@@ -0,0 +1,7 @@
+#!/usr/bin/env bash
+
+DEPOT_TOOLS=$(dirname "$0")/..
+
+PYTHON_BIN_DIR="$DEPOT_TOOLS/$(cat $DEPOT_TOOLS/python_bin_reldir.txt | xargs echo)"
+PATH="$PYTHON_BIN_DIR":"$PATH"
+"$PYTHON_BIN_DIR/python" "$@"