Mercurial > hg
changeset 51711:832a1aeb576f
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.
author | Raphaël Gomès <rgomes@octobus.net> |
---|---|
date | Tue, 23 Jul 2024 12:10:31 +0200 |
parents | 8fe7c0e1df1e |
children | e153995011b7 |
files | contrib/setup-pytype.sh |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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