# HG changeset patch # User Raphaël Gomès # Date 1721729431 -7200 # Node ID 832a1aeb576f99db0ea985da2f5ffa48fd309b4f # Parent 8fe7c0e1df1ef290a6c58b6f871ee151c7046284 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. diff -r 8fe7c0e1df1e -r 832a1aeb576f contrib/setup-pytype.sh --- 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