-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
82 lines (67 loc) · 2.6 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
#!/usr/bin/env python
import sys
import os
import re
from setuptools import setup, find_packages
from setuptools.command.install import install as _install
from setuptools.command.develop import develop as _develop
class Install(_install):
def run(self):
_install.run(self)
import nltk
nltk.download('wordnet') # for nlpnorm
nltk.download('averaged_perceptron_tagger') # for nlpnorm
nltk.download('omw-1.4') # for nlpnorm test?
nltk.download('stopwords') # for source.rfcdoc
class Develop(_develop):
def run(self):
_develop.run(self)
import nltk
nltk.download('wordnet') # for nlpnorm
nltk.download('averaged_perceptron_tagger') # for nlpnorm
nltk.download('omw-1.4') # for nlpnorm test?
nltk.download('stopwords') # for source.rfcdoc
def load_readme():
with open('README.rst', 'r') as fd:
return fd.read()
def load_requirements():
"""Parse requirements.txt"""
reqs_path = os.path.join('.', 'requirements.txt')
with open(reqs_path, 'r') as fd:
requirements = [line.rstrip() for line in fd]
return requirements
package_name = 'amulog-semantics'
module_name = 'amsemantics'
data_dir = "/".join((module_name, "data"))
sys.path.append("./tests")
# data_files = ["/".join((data_dir, fn)) for fn in os.listdir(data_dir)]
init_path = os.path.join(os.path.dirname(__file__), module_name, '__init__.py')
with open(init_path) as f:
version = re.search("__version__ = '([^']+)'", f.read()).group(1)
setup(
name=package_name,
version=version,
description='Semantic analysis extension of amulog',
long_description=load_readme(),
author='Satoru Kobayashi <sat@nii.ac.jp>, Kazuki Otomo <otomo@hongo.wide.ad.jp>',
author_email='sat@nii.ac.jp',
url='https://github.com/amulog/amulog-semantics/',
install_requires=load_requirements(),
classifiers=[
'Development Status :: 4 - Beta',
'Environment :: Console',
'Intended Audience :: Information Technology',
'Intended Audience :: Science/Research',
"Intended Audience :: Developers",
'License :: OSI Approved :: BSD License',
"Operating System :: OS Independent",
'Programming Language :: Python :: 3.6',
'Topic :: Scientific/Engineering :: Information Analysis',
'Topic :: Software Development :: Libraries :: Python Modules'],
cmdclass={"develop": Develop,
"install": Install},
license='The 3-Clause BSD License',
packages=find_packages(),
# package_data={'amsemantics': data_files},
include_package_data=True,
)