-
Notifications
You must be signed in to change notification settings - Fork 179
/
setup.py
50 lines (44 loc) · 1.37 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
# Reference: http://python-packaging.readthedocs.io/en/latest/dependencies.html
from setuptools import setup, find_packages
import os, io, sys
import contextlib
@contextlib.contextmanager
def chdir(new_dir):
old_dir = os.getcwd()
try:
os.chdir(new_dir)
sys.path.insert(0, new_dir)
yield
finally:
del sys.path[0]
os.chdir(old_dir)
def setup_package():
root = os.path.abspath(os.path.dirname(__file__))
with chdir(root):
with io.open(os.path.join(root, 'skater', 'about.py'), encoding='utf8') as f:
about = {}
exec(f.read(), about)
with io.open(os.path.join(root, 'description.rst'), encoding='utf8') as f:
readme = f.read()
setup(
name=about['__title__'],
zip_safe=False,
packages=find_packages(),
description=about['__summary__'],
long_description=readme,
author=about['__author__'],
author_email=about['__email__'],
version=about['__version__'],
url=about['__uri__'],
license=about['__license__'],
install_requires=[
'scikit-learn>=0.18',
'pandas>=0.19',
'ds-lime>=0.1.1.21',
'requests',
'pathos==0.2.0',
'dill>=0.2.6'],
extras_require ={'all':'matplotlib'},
)
if __name__ == '__main__':
setup_package()