forked from gcovr/gcovr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
72 lines (63 loc) · 2.37 KB
/
setup.py
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
# _________________________________________________________________________
#
# Gcovr: A parsing and reporting tool for gcov
# Copyright (c) 2013 Sandia Corporation.
# This software is distributed under the BSD License.
# Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
# the U.S. Government retains certain rights in this software.
# For more information, see the README.md file.
# _________________________________________________________________________
"""
Script to generate the installer for gcovr.
"""
import os
import os.path
import runpy
from setuptools import setup
def read(*rnames):
return open(os.path.join(os.path.dirname(__file__), *rnames), 'rb').read().decode("UTF-8")
def run_path(filename):
variables = dict()
execfile(filename, globals(), variables) # noqa: F821 execfile()
return variables
# Retrieve the gcovr version. This prefers to use runpy.run_path() which is
# only supported in Python 2.7 or later, and falls back to execfile() which
# does not exist in Python 3.x.
run_path = getattr(runpy, 'run_path', run_path)
version = run_path('./gcovr/version.py')['__version__']
setup(name='gcovr',
version=version,
maintainer='William Hart',
maintainer_email='[email protected]',
url='http://gcovr.com',
license='BSD',
platforms=["any"],
python_requires='>=2.6',
description='A Python script for summarizing gcov data.',
long_description=read('README.rst'),
classifiers=[
'Development Status :: 4 - Beta',
'Intended Audience :: End Users/Desktop',
'Intended Audience :: Science/Research',
'License :: OSI Approved :: BSD License',
'Natural Language :: English',
'Operating System :: Microsoft :: Windows',
'Operating System :: Unix',
'Programming Language :: Python',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Unix Shell',
'Topic :: Software Development :: Libraries :: Python Modules',
],
packages=['gcovr'],
install_requires=[
'argparse ; python_version < "2.7"',
],
keywords=['utility'],
entry_points={
'console_scripts': [
'gcovr=gcovr.__main__:main',
],
},
)