-
Notifications
You must be signed in to change notification settings - Fork 5
/
setup.py
65 lines (57 loc) · 1.49 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
#!/usr/bin/env python
import imp
import os
import setuptools
requirements = {
'stylecheck': [
'hacking',
'autopep8',
],
'test': [
'numpy',
'pytest',
],
'travis': [
'-r stylecheck',
'-r test',
'pytest-timeout',
'pytest-cov',
],
'appveyor': [
'-r stylecheck',
'-r test',
'pytest-timeout',
'pytest-cov',
],
}
def reduce_requirements(reqs):
# Resolve recursive requirements notation (-r)
resolved_reqs = []
for req in reqs:
if req.startswith('-r'):
depend_key = req[2:].lstrip()
reduce_requirements(depend_key)
resolved_reqs += requirements[depend_key]
else:
resolved_reqs.append(req)
return resolved_reqs
extras_require = {k: reduce_requirements(v) for k, v in requirements.items()}
here = os.path.abspath(os.path.dirname(__file__))
__version__ = imp.load_source(
'_version', os.path.join(here, 'daz', '_version.py')).__version__
setuptools.setup(
name='daz',
version=__version__,
description=('daz: Denormals are zeros. '
'The tool to change the CPU flag about denormals number.'),
author='Ryosuke Okuta',
author_email='[email protected]',
url='https://github.com/chainer/daz',
license='MIT License',
packages=[
'daz',
],
ext_modules=[setuptools.Extension('daz._core', ['daz/_core.c'])],
zip_safe=False,
extras_require=extras_require,
)