forked from 5hirish/adam_qas
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
63 lines (51 loc) · 1.54 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
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Setup file for qas.
"""
import contextlib
import io
import os
import sys
from setuptools import setup, find_packages
@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():
base_dir = os.path.abspath(os.path.dirname(__file__))
with chdir(base_dir):
with io.open(os.path.join(base_dir, 'qas', 'about.py'), encoding='utf8') as fp:
about = {}
exec(fp.read(), about)
with io.open(os.path.join(base_dir, 'README.rst'), encoding='utf8') as f:
readme = f.read()
setup(name=about['__title__'],
packages=find_packages(),
description=about['__summary__'],
long_description=readme,
version=about['__version__'],
author=about['__author__'],
author_email=about['__email__'],
url=about['__uri__'],
license=about['__license__'],
# TODO change the signs from '>=' to '==' like we did on adam_qas/requirements.txt
install_requires=[
"autocorrect>=0.3.0",
"gensim>=3.0.1",
"lxml>=4.1.0",
"pandas>=0.21",
"pyenchant>=2.0.0",
"requests>=2.18.0",
"spaCy>=2.0.3",
"scikit-learn>=v0.19.1",
"wikipedia>=1.4.0"]
)
if __name__ == "__main__":
setup_package()