summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsetup.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/setup.py b/setup.py
index a913274b..3c3a9e0b 100755
--- a/setup.py
+++ b/setup.py
@@ -249,7 +249,14 @@ class Check(Command):
print "no .git, no nitpick for you"
def check_with_pep8(self):
- cliapp.runcmd(['pep8', 'obnamlib'], stdout=None, stderr=None)
+ output = cliapp.runcmd(['pep8', '--version'])
+ parts = output.strip().split('.')
+ # pep8 version 1.5.7 is in Debian jessie. Previous versions
+ # give bad warnings about whitespace around some operators,
+ # and later versions don't. So we only run pep8 if it's new
+ # enough.
+ if parts >= (1,5,7):
+ cliapp.runcmd(['pep8', 'obnamlib'], stdout=None, stderr=None)
def check_with_pylint(self):
cliapp.runcmd(