This repository has been archived by the owner on Apr 23, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 20
/
setup.py
132 lines (105 loc) · 3.93 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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
try:
from pip.req import parse_requirements
except ImportError:
# The req module has been moved to pip._internal in the 10 release.
from pip._internal.req import parse_requirements
import lnt
import os
from sys import platform as _platform
import sys
from setuptools import setup, find_packages, Extension
if sys.version_info < (2, 7):
raise RuntimeError("Python 2.7 or higher required.")
cflags = []
if _platform == "darwin":
os.environ["CC"] = "xcrun --sdk macosx clang"
os.environ["CXX"] = "xcrun --sdk macosx clang"
cflags += ['-stdlib=libc++', '-mmacosx-version-min=10.7']
# setuptools expects to be invoked from within the directory of setup.py, but
# it is nice to allow:
# python path/to/setup.py install
# to work (for scripts, etc.)
os.chdir(os.path.dirname(os.path.abspath(__file__)))
cPerf = Extension('lnt.testing.profile.cPerf',
sources=['lnt/testing/profile/cPerf.cpp'],
extra_compile_args=['-std=c++11'] + cflags)
if "--server" in sys.argv:
sys.argv.remove("--server")
req_file = "requirements.server.txt"
else:
req_file = "requirements.client.txt"
try:
install_reqs = parse_requirements(req_file, session=False)
except TypeError:
# In old PIP the session flag cannot be passed.
install_reqs = parse_requirements(req_file)
reqs = [str(ir.req) for ir in install_reqs]
setup(
name="LNT",
version=lnt.__version__,
author=lnt.__author__,
author_email=lnt.__email__,
url='http://llvm.org',
license = 'Apache-2.0 with LLVM exception',
description="LLVM Nightly Test Infrastructure",
keywords='web testing performance development llvm',
long_description="""\
*LNT*
+++++
About
=====
*LNT* is an infrastructure for performance testing. The software itself
consists of two main parts, a web application for accessing and visualizing
performance data, and command line utilities to allow users to generate and
submit test results to the server.
The package was originally written for use in testing LLVM compiler
technologies, but is designed to be usable for the performance testing of any
software.
Documentation
=============
The official *LNT* documentation is available online at:
http://llvm.org/docs/lnt
Source
======
The *LNT* source is available in the LLVM SVN repository:
http://llvm.org/svn/llvm-project/lnt/trunk
""",
classifiers=[
'Development Status :: 4 - Beta',
'Environment :: Web Environment',
'Intended Audience :: Developers',
'License :: OSI Approved :: Apache-2.0 with LLVM exception',
'Natural Language :: English',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Topic :: Software Development :: Quality Assurance',
'Topic :: Software Development :: Testing',
],
zip_safe=False,
# Additional resource extensions we use.
package_data={'lnt.server.ui': ['static/*.ico',
'static/*.js',
'static/*.css',
'static/*.svg',
'static/bootstrap/css/*.css',
'static/bootstrap/js/*.js',
'static/bootstrap/img/*.png',
'static/flot/*.min.js',
'static/d3/*.min.js',
'static/jquery/**/*.min.js',
'templates/*.html',
'templates/reporting/*.html',
'templates/reporting/*.txt'],
'lnt.server.db': ['migrations/*.py'],
},
packages=find_packages(),
test_suite='tests.test_all',
entry_points={
'console_scripts': [
'lnt = lnt.lnttool:main',
],
},
install_requires=reqs,
ext_modules=[cPerf],
python_requires='>=2.7',
)