Mercurial > hg
view contrib/setup-pytype.sh @ 50650:4d84b6d52e93 stable
delta-find: move final debug processing in a `_dbg_process_data` method
This will help us making sure we can call the necessary debugging code in
alternative codepath.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Thu, 08 Jun 2023 01:52:35 +0200 |
parents | 03792c1ed341 |
children | 6aa74bcd4255 |
line wrap: on
line source
#!/bin/bash set -e set -u # Find the python3 setup that would run pytype PYTYPE=`which pytype` PYTHON3=`head -n1 ${PYTYPE} | sed -s 's/#!//'` # Existing stubs that pytype processes live here TYPESHED=$(${PYTHON3} -c "import pytype; print(pytype.__path__[0])")/typeshed/stubs HG_STUBS=${TYPESHED}/mercurial echo "Patching typeshed at $HG_STUBS" rm -rf ${HG_STUBS} mkdir -p ${HG_STUBS} cat > ${HG_STUBS}/METADATA.toml <<EOF version = "0.1" EOF mkdir -p ${HG_STUBS}/mercurial/cext ${HG_STUBS}/mercurial/thirdparty/attr touch ${HG_STUBS}/mercurial/__init__.pyi touch ${HG_STUBS}/mercurial/cext/__init__.pyi touch ${HG_STUBS}/mercurial/thirdparty/__init__.pyi ln -sf $(hg root)/mercurial/cext/*.{pyi,typed} \ ${HG_STUBS}/mercurial/cext ln -sf $(hg root)/mercurial/thirdparty/attr/*.{pyi,typed} \ ${HG_STUBS}/mercurial/thirdparty/attr