diff options
author | Pavel Hrdina <phrdina@redhat.com> | 2017-09-09 11:08:31 +0200 |
---|---|---|
committer | Pavel Hrdina <phrdina@redhat.com> | 2017-09-09 11:10:42 +0200 |
commit | ec266d3cda29651aed5bf10b455fdef37aeafcf3 (patch) | |
tree | 242db8f4e4c84f41ff79e23e4de2bf2a323ba4c9 /setup.py | |
parent | 4b108a8c7579acaaa137ae84f2e1c8693534b864 (diff) | |
download | virt-manager-ec266d3cda29651aed5bf10b455fdef37aeafcf3.tar.gz |
setup: introduce --jobs for pylint
Pylint supports configuring jobs to use multiple processes to
speed up Pylint. Default value is 1.
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Diffstat (limited to 'setup.py')
-rwxr-xr-x | setup.py | 12 |
1 files changed, 9 insertions, 3 deletions
@@ -563,13 +563,17 @@ class TestInitrdInject(TestBaseCommand): class CheckPylint(distutils.core.Command): - user_options = [] + user_options = [ + ("jobs=", "j", "use multiple processes to speed up Pylint"), + ] description = "Check code using pylint and pycodestyle" def initialize_options(self): - pass + self.jobs = None + def finalize_options(self): - pass + if self.jobs: + self.jobs = int(self.jobs) def run(self): files = ["setup.py", "virt-install", "virt-clone", @@ -592,6 +596,8 @@ class CheckPylint(distutils.core.Command): cmd = "pylint-2 " else: cmd = "pylint " + if self.jobs: + cmd += "--jobs=%d " % self.jobs cmd += "--rcfile tests/pylint.cfg " cmd += "--output-format=%s " % output_format cmd += "--ignore %s " % ",".join( |