mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-09-13 22:42:29 +03:00
Fix detection of pyflakes3 found in Debian
This commit is contained in:
parent
d98b4d1b83
commit
84568c15a6
1 changed files with 14 additions and 15 deletions
|
@ -70,22 +70,21 @@ cmd_exists() {
|
||||||
command -v $1 1>/dev/null
|
command -v $1 1>/dev/null
|
||||||
}
|
}
|
||||||
|
|
||||||
if cmd_exists pyflakes-python3; then
|
find_command() {
|
||||||
PYFLAKES=pyflakes-python3
|
local name=$1
|
||||||
elif cmd_exists pyflakes; then
|
for suff in "3" "-python3" ""; do
|
||||||
PYFLAKES=pyflakes
|
cmd=${1}${suff}
|
||||||
else
|
if cmd_exists $cmd; then
|
||||||
PYFLAKES=echo
|
echo -n $cmd
|
||||||
warn "pyflakes is not installed, using dummy placeholder!"
|
return 0
|
||||||
fi
|
fi
|
||||||
|
done
|
||||||
|
warn "$1 is not installed, using dummy placeholder!"
|
||||||
|
echo -n echo
|
||||||
|
}
|
||||||
|
|
||||||
if cmd_exists pep8-python3; then
|
PYFLAKES=$(find_command pyflakes)
|
||||||
PEP8=pep8-python3
|
PEP8=$(find_command pep8)
|
||||||
elif cmd_exists pep8; then
|
|
||||||
PEP8=pep8
|
|
||||||
else
|
|
||||||
err "pep8 is not installed!"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$PY_FILES $PY_TEST_FILES" != " " ]; then
|
if [ "$PY_FILES $PY_TEST_FILES" != " " ]; then
|
||||||
if ! $PYFLAKES $PY_FILES $PY_TEST_FILES; then
|
if ! $PYFLAKES $PY_FILES $PY_TEST_FILES; then
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue