pytype: only try the hacky way of finding PYTHON if not provided
This allows us to work in more environments, like when using pyenv. This
syntax is compatible with all POSIX shells.
--- a/contrib/setup-pytype.sh Mon Jul 22 14:42:54 2024 +0200
+++ b/contrib/setup-pytype.sh Tue Jul 23 12:10:31 2024 +0200
@@ -5,7 +5,7 @@
# Find the python3 setup that would run pytype
PYTYPE=`which pytype`
-PYTHON3=`head -n1 ${PYTYPE} | sed -s 's/#!//'`
+PYTHON3=${PYTHON:-`head -n1 ${PYTYPE} | sed -s 's/#!//'`}
# Existing stubs that pytype processes live here
TYPESHED=$(${PYTHON3} -c "import pytype; print(pytype.__path__[0])")/typeshed/stubs