Skip to content

Commit 2af9d96

Browse files
committed
freeze versions for python 2.7, fix setup.py for commments breaking pip
1 parent 2c47e00 commit 2af9d96

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

setup.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,12 @@ class Lint(Cmd):
3535
def run(self):
3636
self.execute('cpplint.py')
3737

38+
# some pip versions bark on comments (e.g. on travis)
39+
def read_without_comments(filename):
40+
with open(filename) as f:
41+
return [l for l in f.read().splitlines() if not len(l) == 0 and not l.startswith('#')]
3842

39-
with open('test-requirements') as f:
40-
test_required = f.read().splitlines()
41-
43+
test_required = read_without_comments('test-requirements')
4244

4345
setup(name='cpplint',
4446
version=cpplint.__VERSION__,
@@ -78,7 +80,7 @@ def run(self):
7880
# extras_require allow pip install .[dev]
7981
extras_require={
8082
'test': test_required,
81-
'dev': open('dev-requirements').read().splitlines() + test_required
83+
'dev': read_without_comments('dev-requirements') + test_required
8284
},
8385
cmdclass={
8486
'lint': Lint

test-requirements

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,7 @@
22
# 5.x requires python 3.5
33
pytest>=4.6,<5.0
44
pytest-cov
5-
pyparsing=2.4.0
5+
# freeze versions breaking python 2.7 on travis
6+
pyparsing<3
7+
zipp<=0.5.1
8+
configparser<=3.7.4

0 commit comments

Comments
 (0)