From 7b605851349a8c469d11d0f9daacc0f56474d23f Mon Sep 17 00:00:00 2001 From: Pierre Riteau Date: Fri, 11 Sep 2020 15:44:17 +0200 Subject: [PATCH] Update hacking for Python3 The repo is Python 3 now, so update hacking to version 3.0 which supports Python 3. Ignore bashate failure on one-liner loops. Add pcre devel packages to fix failing pep8 jobs. Change-Id: I3442174b378cc6e361550fcb9b32a62f61fa7972 --- bindep.txt | 2 ++ test-requirements.txt | 2 +- tools/run-bashate.sh | 4 +++- 3 files changed, 6 insertions(+), 2 deletions(-) create mode 100644 bindep.txt diff --git a/bindep.txt b/bindep.txt new file mode 100644 index 000000000..e05653404 --- /dev/null +++ b/bindep.txt @@ -0,0 +1,2 @@ +libpcre3-dev [platform:dpkg test] +pcre-devel [platform:rpm test] diff --git a/test-requirements.txt b/test-requirements.txt index 8aec37e69..9eab9b7ee 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -7,7 +7,7 @@ bashate>=0.2 # Apache-2.0 coverage>=4.0 # Apache-2.0 doc8 # Apache-2.0 docker<3 # Apache-2.0 -hacking>=0.12.0,<0.13 # Apache-2.0 +hacking>=3.0,<3.1.0 # Apache-2.0 molecule<3 # MIT oslotest>=1.10.0 # Apache-2.0 # paramiko 2.5.0 makes the kayobe-tox-molecule job fail. diff --git a/tools/run-bashate.sh b/tools/run-bashate.sh index 897228c81..6bda1c654 100755 --- a/tools/run-bashate.sh +++ b/tools/run-bashate.sh @@ -3,5 +3,7 @@ # Ignore E006 -- line length greater than 80 char ROOT=$(readlink -fn $(dirname $0)/.. ) +# NOTE(priteau): ignore E010 because it fails on one-liner bash loops: +# https://bugs.launchpad.net/bash8/+bug/1895102 find $ROOT -not -wholename \*.tox/\* -and -not -wholename \*.test/\* \ - -and -name \*.sh -print0 | xargs -0 bashate -v --ignore E006 + -and -name \*.sh -print0 | xargs -0 bashate -v --ignore E006 --ignore E010