forked from douban/tfmesos
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
58 lines (49 loc) · 1.55 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
import os
import re
import glob
from setuptools import setup, find_packages
def find_version(*paths):
fname = os.path.join(*paths)
with open(fname) as fhandler:
version_file = fhandler.read()
version_match = re.search(r"^__VERSION__ = ['\"]([^'\"]*)['\"]",
version_file, re.M)
if not version_match:
raise RuntimeError("Unable to find version string in %s" % (fname,))
version = version_match.group(1)
return version
def find_readme(*paths):
with open(os.path.join(*paths)) as f:
return f.read()
version = find_version('tfmesos', '__init__.py')
setup(
name='tfmesos',
version=version,
packages=find_packages(),
license='BSD License',
description="Tensorflow on Mesos",
long_description=find_readme('README.rst'),
author="Zhongbo Tian",
author_email="[email protected]",
download_url=(
'https://github.com/douban/tfmesos/archive/%s.tar.gz' % version
),
classifiers=[
"Intended Audience :: Developers",
"License :: OSI Approved :: BSD License",
"Programming Language :: Python",
"Programming Language :: Python :: Implementation :: CPython",
"Operating System :: POSIX :: Linux",
"Topic :: Software Development :: Libraries"
],
install_requires=[
'six',
'addict',
'pymesos>=0.2.2',
],
extras_require={
'cpu': ['tensorflow>=0.8.0'],
'gpu': ['tensorflow-gpu>=0.8.0'],
},
scripts=glob.glob(os.path.join('script', '*')),
)