Fix CI: only run pyflakes if already installed

This commit is contained in:
Brandon Rhodes 2020-07-09 15:02:52 -04:00
parent dbd2d3c9ec
commit 1bec4666f2
1 changed files with 2 additions and 2 deletions

View File

@ -16,9 +16,9 @@ to install all of the tools and libraries for Skyfield development.
EOF
exit 2
fi
if python --version | grep -q 'Python 3.6'
if python --version | grep -q 'Python 3.6' && command -v pyflakes >/dev/null
then
d=$(python -c 'import skyfield as s; print(s.__file__.rsplit("/", 1)[0])')
pyflakes "$d"/*.py "$d"/data/*.py
pyflakes $(find "$d" -name '*.py')
fi
exec assay --batch skyfield.tests