Change the use of pylint to optionally use pylint3

Pylint when installed as a distro package can be installed as pylint3, whilst as
a PEP egg, it can be installed as pylint.

This commit changes the scripts to first use pylint if installed, and optionally
look for pylint3 if not installed. This is to allow a preference for the PEP
version over the distro version, assuming the PEP one is more likely to be
the correct one.

Signed-off-by: Simon Butcher <simon.butcher@arm.com>
This commit is contained in:
Simon Butcher 2020-03-16 11:30:46 +00:00
parent 21d1cbccda
commit e30d03e4f4
3 changed files with 29 additions and 3 deletions

View file

@ -1595,7 +1595,13 @@ component_test_zeroize () {
}
support_check_python_files () {
type pylint3 >/dev/null 2>/dev/null
# Find the installed version of Pylint. Installed as a distro package this can
# be pylint3 and as a PEP egg, pylint.
if type pylint >/dev/null 2>/dev/null || type pylint3 >/dev/null 2>/dev/null; then
true;
else
false;
fi
}
component_check_python_files () {
msg "Lint: Python scripts"