Tweak how python/python3 is used.

The kokoro Mac configs seem to be pretty old without python3, tweak how things
are invoked to try and better deal with those configs.
pull/9642/head^2
Thomas Van Lenten 3 years ago
parent 205117c44b
commit ca30339529
  1. 10
      objectivec/DevTools/full_mac_build.sh
  2. 2
      objectivec/DevTools/pddm.py
  3. 2
      objectivec/DevTools/pddm_tests.py

@ -234,8 +234,14 @@ fi
objectivec/generate_well_known_types.sh --check-only -j "${NUM_MAKE_JOBS}"
header "Checking on the ObjC Runtime Code"
objectivec/DevTools/pddm_tests.py
if ! objectivec/DevTools/pddm.py --dry-run objectivec/*.[hm] objectivec/Tests/*.[hm] ; then
# Some of the kokoro machines don't have python3 yet, so fall back to python if need be.
if hash python3 >/dev/null 2>&1 ; then
LOCAL_PYTHON=python3
else
LOCAL_PYTHON=python
fi
"${LOCAL_PYTHON}" objectivec/DevTools/pddm_tests.py
if ! "${LOCAL_PYTHON}" objectivec/DevTools/pddm.py --dry-run objectivec/*.[hm] objectivec/Tests/*.[hm] ; then
echo ""
echo "Update by running:"
echo " objectivec/DevTools/pddm.py objectivec/*.[hm] objectivec/Tests/*.[hm]"

@ -1,4 +1,4 @@
#! /usr/bin/python3
#! /usr/bin/env python3
#
# Protocol Buffers - Google's data interchange format
# Copyright 2015 Google Inc. All rights reserved.

@ -1,4 +1,4 @@
#! /usr/bin/python3
#! /usr/bin/env python3
#
# Protocol Buffers - Google's data interchange format
# Copyright 2015 Google Inc. All rights reserved.

Loading…
Cancel
Save