Uh oh!
There was an error while loading. Please reload this page.
forked from cpplint/cpplint
- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
Latest commit
executable file
·86 lines (75 loc) · 2.89 KB
/
Copy pathsetup.py
File metadata and controls
executable file
·86 lines (75 loc) · 2.89 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
#! /usr/bin/env python
fromsetuptoolsimportsetup, Command
fromsubprocessimportcheck_call
fromdistutils.spawnimportfind_executable
importcpplintascpplint
classCmd(Command):
'''
Superclass for other commands to run via setup.py, declared in setup.cfg.
These commands will auto-install setup_requires in a temporary folder.
'''
user_options= [
('executable', 'e', 'The executable to use for the command')
]
definitialize_options(self):
self.executable=find_executable(self.executable)
deffinalize_options(self):
pass
defexecute(self, *k):
check_call((self.executable,) +k)
classLint(Cmd):
'''run with python setup.py lint'''
description='Run linting of the code'
user_options=Cmd.user_options+ [
('jobs', 'j', 'Use multiple processes to speed up the linting')
]
executable='pylint'
defrun(self):
self.execute('cpplint.py')
# some pip versions bark on comments (e.g. on travis)
defread_without_comments(filename):
withopen(filename) asf:
return [lineforlineinf.read().splitlines() ifnotlen(line) ==0andnotline.startswith('#')]
test_required=read_without_comments('test-requirements')
setup(name='cpplint',
version=cpplint.__VERSION__,
py_modules=['cpplint'],
# generate platform specific start script
entry_points={
'console_scripts': [
'cpplint = cpplint:main'
]
},
install_requires=[],
url='https://github.com/cpplint/cpplint',
download_url='https://github.com/cpplint/cpplint',
keywords=['lint', 'python', 'c++'],
maintainer='cpplint Developers',
maintainer_email='see_github@nospam.com',
classifiers=['Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: C++',
'Development Status :: 5 - Production/Stable',
'Environment :: Console',
'Topic :: Software Development :: Quality Assurance',
'License :: Freely Distributable'],
description='Automated checker to ensure C++ files follow Google\'s style guide',
long_description=open('README.rst').read(),
license='BSD-3-Clause',
setup_requires=[
"pytest-runner==5.2"
],
tests_require=test_required,
# extras_require allow pip install .[dev]
extras_require={
'test': test_required,
'dev': read_without_comments('dev-requirements') +test_required
},
cmdclass={
'lint': Lint
})