-
Notifications
You must be signed in to change notification settings - Fork 120
/
Copy pathsetup.py
executable file
·194 lines (163 loc) · 5.66 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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
#! /usr/bin/env python3
# SPDX-License-Identifier: Apache-2.0
#
# Copyright (C) 2018, Arm Limited and contributors.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
import os
import sys
import itertools
import platform
from setuptools import setup, find_packages, find_namespace_packages
plat = platform.system()
if plat != 'Linux':
raise ValueError(f'Only Linux is supported, {plat} is unsupported')
with open('README.rst', 'r') as f:
long_description = f.read()
with open('LICENSE.txt', 'r') as f:
license_txt = f.read()
with open("lisa/_version.py") as f:
version_globals = dict()
exec(f.read(), version_globals)
lisa_version = version_globals['__version__']
def make_console_script(name):
mod_name = name.replace('.py', '')
cli_name = mod_name.replace('_', '-')
return f'{cli_name}=lisa._cli_tools.{mod_name}:main'
with os.scandir('lisa/_cli_tools/') as scanner:
console_scripts = [
make_console_script(entry.name)
for entry in scanner
if entry.name.endswith('.py') and entry.is_file()
]
def _find_packages(toplevel):
return [toplevel] + [
f'{toplevel}.{pkg}'
for pkg in sorted(set(itertools.chain(
find_namespace_packages(where=toplevel),
find_packages(where=toplevel),
)))
]
packages = _find_packages('lisa')
package_data = {
package: ['*']
for package in packages
if package.startswith('lisa._assets.')
}
package_data['lisa._assets'] = ['*']
extras_require={
"notebook": [
"jupyterlab >= 3",
],
"dev": [
"pip-audit",
"pytest",
"build",
"twine",
],
"wa": [
"wlauto",
],
}
extras_require["doc"] = [
# Force ReadTheDocs to use a recent version, rather than the defaults used
# for old projects.
"sphinx > 2",
"pydata-sphinx-theme",
"sphinxcontrib-plantuml",
"nbsphinx",
# Add all the other optional dependencies to ensure all modules from lisa
# can safely be imported
*itertools.chain.from_iterable(extras_require.values())
]
# "all" extra requires all to install all the optional dependencies
extras_require['all'] = sorted(set(
itertools.chain.from_iterable(extras_require.values())
))
python_requires = '>= 3.8'
if __name__ == "__main__":
setup(
name='lisa-linux',
license='Apache License 2.0',
version=lisa_version,
maintainer='Arm Ltd.',
packages=packages,
url='https://gitlab.arm.com/tooling/lisa',
project_urls={
"Documentation": "https://tooling.sites.arm.com/lisa/",
"Bug Tracker": "https://gitlab.arm.com/tooling/lisa/-/issues",
"Source Code": "https://gitlab.arm.com/tooling/lisa",
},
description='A stick to probe the kernel with',
long_description=long_description,
python_requires=python_requires,
install_requires=[
"psutil >= 4.4.2",
"bokeh",
# For bokeh static image exports
"selenium",
"phantomjs",
"pillow",
# For twin axes support: https://holoviews.org/user_guide/Customizing_Plots.html#twin-axes
"holoviews >= 1.17",
"panel",
"colorcet",
# Avoid:
# polars 1.7.0, 1.7.1: https://github.com/pola-rs/polars/issues/18719
# Require:
# polars >= 1.15.0: https://github.com/pola-rs/polars/issues/19994
# polars >= 1.16.0: https://github.com/pola-rs/polars/issues/20000
"polars >= 1.16.0, < 2.0.0",
# Pandas >= 1.0.0 has support for new nullable dtypes
# Pandas 1.2.0 has broken barplots:
# https://github.com/pandas-dev/pandas/issues/38947
"pandas >=1.0.0, <3.0",
"numpy",
"scipy",
# Earlier versions have broken __slots__ deserialization
"ruamel.yaml >= 0.16.6",
# For the HTML output of analysis plots
"docutils",
# To open intersphinx inventories
"sphobjinv",
# For pandas.to_parquet() dataframe storage
"pyarrow",
"ipython",
"ipywidgets",
# Depdendencies that are shipped as part of the LISA repo as
# subtree/submodule
"devlib >= 1.3.4",
'jinja2',
"pyelftools", # To get symbol names in kernel module
"cffi", # unshare syscall
"typeguard",
],
extras_require=extras_require,
package_data=package_data,
classifiers=[
"Programming Language :: Python :: 3 :: Only",
# This is not a standard classifier, as there is nothing defined for
# Apache 2.0 yet:
# https://pypi.org/classifiers/
# It has not been tested under any other OS
"Operating System :: POSIX :: Linux",
"Topic :: System :: Operating System Kernels :: Linux",
"Topic :: Software Development :: Testing",
"Intended Audience :: Developers",
],
entry_points={
'console_scripts': console_scripts,
},
)
# vim :set tabstop=4 shiftwidth=4 textwidth=80 expandtab