anki/tools/typecheck-setup.sh
Damien Elmes b88de95cd8 bundle sip-generated stubs
the PyQt5-stubs package that's floating around depends on an old
Qt, and throws a bunch of errors
2019-12-16 09:59:18 +10:00

14 lines
530 B
Bash
Executable File

#!/bin/bash
#
# Anki bundles sip 5 generated typings that allow type checking Qt code when
# installed next to the original modules. Attempting to use them as a separate
# stubs distribution with MYPYPATH yielded a bunch of errors which I was not
# able to resolve. A solution that doesn't require modifying the python install
# would be welcome!
TOOLS="$(cd "`dirname "$0"`"; pwd)"
modDir=$(python -c 'import PyQt5, sys, os; print(os.path.dirname(sys.modules["PyQt5"].__file__))')
sudo rsync -av $TOOLS/stubs/PyQt5/* $modDir/