summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2014-05-31 16:29:18 +0100
committerLars Wirzenius <liw@liw.fi>2014-05-31 16:29:18 +0100
commit5f725aa613fc49b27842677a7bcfbc84423086a3 (patch)
tree6ca4a5bdf57dea55877d6a86932f44792ae4ea27 /setup.py
parentaaaab01b791be06be08e79c8f7a73b1fe16ecbf3 (diff)
downloaddistix-5f725aa613fc49b27842677a7bcfbc84423086a3.tar.gz
Run pep8 in "setup.py check"
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/setup.py b/setup.py
index 6e794cc..03c643d 100644
--- a/setup.py
+++ b/setup.py
@@ -32,11 +32,13 @@ class Check(Command):
user_options = [
('unit-tests', 'u', 'run unit tests?'),
('yarns', 'y', 'run yarn tests locally?'),
+ ('pep8', '8', 'run pep8 on the source?'),
]
def set_all_options(self, new_value):
self.unit_tests = new_value
self.yarns = new_value
+ self.pep8 = new_value
def initialize_options(self):
self.set_all_options(False)
@@ -44,7 +46,8 @@ class Check(Command):
def finalize_options(self):
any_set = (
self.unit_tests or
- self.yarns)
+ self.yarns or
+ self.pep8)
if not any_set:
self.set_all_options(True)
@@ -55,6 +58,9 @@ class Check(Command):
if self.yarns:
self.run_yarns()
+ if self.pep8:
+ self.run_pep8()
+
def run_unit_tests(self):
cliapp.runcmd(
['python', '-m', 'CoverageTestRunner',
@@ -67,6 +73,9 @@ class Check(Command):
['yarn'] + glob.glob('yarns/*.yarn'),
stdout=None, stderr=None)
+ def run_pep8(self):
+ cliapp.runcmd(['pep8', 'distixlib'], stdout=None, stderr=None)
+
setup(name='distix',
version=distixlib.version.version_string,