Gentoo Archives: gentoo-commits

From: Zac Medico <zmedico@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/portage:master commit in: /
Date: Tue, 04 Aug 2020 04:08:50
Message-Id: 1596512211.b73bbf1be0c1ab600ffcbed704f0c331eb033dfe.zmedico@gentoo
1 commit: b73bbf1be0c1ab600ffcbed704f0c331eb033dfe
2 Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
3 AuthorDate: Thu Jul 30 06:47:12 2020 +0000
4 Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
5 CommitDate: Tue Aug 4 03:36:51 2020 +0000
6 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=b73bbf1b
7
8 tox: add pylint
9
10 Signed-off-by: Zac Medico <zmedico <AT> gentoo.org>
11
12 setup.py | 16 ++++++++++++++++
13 tox.ini | 2 ++
14 2 files changed, 18 insertions(+)
15
16 diff --git a/setup.py b/setup.py
17 index bef5c31fa..1c25b9cd7 100755
18 --- a/setup.py
19 +++ b/setup.py
20 @@ -606,6 +606,21 @@ class test(Command):
21 ])
22
23
24 +class lint(Command):
25 + """ run lint """
26 +
27 + user_options = []
28 +
29 + def initialize_options(self):
30 + pass
31 +
32 + def finalize_options(self):
33 + pass
34 +
35 + def run(self):
36 + subprocess.check_call(['pylint', 'lib'])
37 +
38 +
39 def find_packages():
40 for dirpath, _dirnames, filenames in os.walk('lib'):
41 if '__init__.py' in filenames:
42 @@ -706,6 +721,7 @@ setup(
43 'install_scripts_sbin': x_install_scripts_sbin,
44 'sdist': x_sdist,
45 'test': test,
46 + 'lint': lint,
47 },
48
49 classifiers = [
50
51 diff --git a/tox.ini b/tox.ini
52 index 050a2c455..7497f4660 100644
53 --- a/tox.ini
54 +++ b/tox.ini
55 @@ -4,11 +4,13 @@ skipsdist = True
56
57 [testenv]
58 deps =
59 + pylint
60 pygost
61 pyyaml
62 py36,py37,py38,py39,pypy3: lxml!=4.2.0
63 setenv =
64 PYTHONPATH={toxinidir}/lib
65 commands =
66 + python -b -Wd setup.py lint
67 python -b -Wd setup.py test
68 python -b -Wd repoman/setup.py test