diff options
Diffstat (limited to 'setup.py')
-rw-r--r-- | setup.py | 13 |
1 files changed, 12 insertions, 1 deletions
@@ -33,12 +33,14 @@ class Check(Command): ('unit-tests', 'u', 'run unit tests?'), ('yarns', 'y', 'run yarn tests locally?'), ('pep8', '8', 'run pep8 on the source?'), + ('pylint', 'l', 'run pylint on the source?'), ] def set_all_options(self, new_value): self.unit_tests = new_value self.yarns = new_value self.pep8 = new_value + self.pylint = new_value def initialize_options(self): self.set_all_options(False) @@ -47,7 +49,8 @@ class Check(Command): any_set = ( self.unit_tests or self.yarns or - self.pep8) + self.pep8 or + self.pylint) if not any_set: self.set_all_options(True) @@ -61,6 +64,9 @@ class Check(Command): if self.pep8 and self.command_is_available('pep8'): self.run_pep8() + if self.pylint and self.command_is_available('pylint'): + self.run_pylint() + def run_unit_tests(self): cliapp.runcmd( ['python', '-m', 'CoverageTestRunner', @@ -81,6 +87,11 @@ class Check(Command): def run_pep8(self): cliapp.runcmd(['pep8', 'distixlib'], stdout=None, stderr=None) + def run_pylint(self): + cliapp.runcmd( + ['pylint', '--rcfile=pylint.conf', 'distixlib'], + stdout=None, stderr=None) + setup(name='distix', version=distixlib.version.version_string, |