This repository has been archived by the owner on Jan 3, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 811
/
setup.py
executable file
·134 lines (125 loc) · 4.77 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
#!/usr/bin/env python
# ******************************************************************************
# Copyright 2017-2018 Intel Corporation
#
# 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
from setuptools import setup, find_packages
import subprocess
# Define version information
VERSION = '2.6.0'
FULLVERSION = VERSION
write_version = True
try:
pipe = subprocess.Popen(["git", "rev-parse", "--short", "HEAD"],
stdout=subprocess.PIPE)
(so, serr) = pipe.communicate()
if pipe.returncode == 0:
FULLVERSION += "+%s" % so.strip().decode("utf-8")
except Exception:
pass
try:
import pypandoc
readme_file = pypandoc.convert('README.md', 'rst')
except:
readme_file = open('README.md').read()
if write_version:
txt = "# " + ("-" * 77) + "\n"
txt += "# Copyright 2017-2018 Intel Corporation\n"
txt += "#\n"
txt += "# Licensed under the Apache License, Version 2.0 "
txt += "(the \"License\");\n"
txt += "# you may not use this file except in compliance with the "
txt += "License.\n"
txt += "# You may obtain a copy of the License at\n"
txt += "#\n"
txt += "# http://www.apache.org/licenses/LICENSE-2.0\n"
txt += "#\n"
txt += "# Unless required by applicable law or agreed to in writing, "
txt += "software\n"
txt += "# distributed under the License is distributed on an \"AS IS\" "
txt += "BASIS,\n"
txt += "# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or "
txt += "implied.\n"
txt += "# See the License for the specific language governing permissions "
txt += "and\n"
txt += "# limitations under the License.\n"
txt += "# " + ("-" * 77) + "\n"
txt += "\"\"\"\n%s\n\"\"\"\nVERSION = '%s'\nSHORT_VERSION = '%s'\n"
fname = os.path.join(os.path.dirname(__file__), 'neon', 'version.py')
a = open(fname, 'w')
try:
a.write(txt % ("Project version information.", FULLVERSION, VERSION))
finally:
a.close()
requirements = [
"configargparse",
"numpy",
"pyyaml",
"pep8",
"flake8",
"pytest",
"pytest-cov",
"pytest-mock",
"posix_ipc",
"pillow",
"pylint",
"sphinx",
"h5py",
"appdirs",
"future",
"tqdm",
"cffi",
"filelock",
"py-cpuinfo",
"pypandoc",
"pandoc"
]
setup(name='nervananeon',
version=VERSION,
description="Intel's deep learning framework",
long_description=readme_file,
author='Intel Deep Learning System',
author_email='[email protected]',
url='http://www.intelnervana.com',
license='License :: OSI Approved :: Apache Software License',
scripts=['bin/neon', 'bin/nvis'],
packages=find_packages(),
install_requires=requirements,
package_data={'neon': ['backends/kernels/sass/*.sass',
'backends/kernels/cubin/*.cubin',
'backends/kernels/maxas/*.pl',
'backends/kernels/maxas/MaxAs/*.pm',
'backends/mklEngine/*.so',
'backends/mklEngine/*.dll',
'backends/mklEngine/*.dylib',
'backends/mklEngine/src/*.header',
'../mklml_*/lib/*.so',
'../loader/bin/*.so']},
classifiers=['Development Status :: 3 - Alpha',
'Environment :: Console',
'Environment :: Console :: Curses',
'Environment :: Web Environment',
'Intended Audience :: End Users/Desktop',
'Intended Audience :: Developers',
'Intended Audience :: Science/Research',
'License :: OSI Approved :: Apache Software License',
'Operating System :: POSIX',
'Operating System :: MacOS :: MacOS X',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 3',
'Topic :: Scientific/Engineering :: ' +
'Artificial Intelligence',
'Topic :: Scientific/Engineering :: Information Analysis',
'Topic :: System :: Distributed Computing'])