-
Notifications
You must be signed in to change notification settings - Fork 21
/
setup.py
54 lines (42 loc) · 1.28 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
from setuptools import setup
import re
with open('README.md') as fp:
long_description = fp.read()
def parse_req_line(line):
line = line.strip()
if not line or line[0] == '#':
return None
return line
def load_requirements(file_name):
with open(file_name) as fp:
reqs = filter(None, (parse_req_line(line) for line in fp))
return list(reqs)
def find_version():
with open('nlp/__init__.py') as fp:
for line in fp:
# __version__ = '0.1.0'
match = re.search(r"__version__\s*=\s*'([^']+)'", line)
if match:
return match.group(1)
assert False, 'cannot find version'
install_requires = load_requirements('requirements.txt')
tests_require = load_requirements('requirements-dev.txt')
setup(
name='nlp',
version=find_version(),
packages=['nlpy'],
entry_points={
'console_scripts': [
'nlpd = nlp.httpd:main',
]
},
install_requires=install_requires,
tests_require=tests_require,
description='NLP for Python',
long_description=long_description,
long_description_content_type='text/markdown',
license='MIT',
maintainer='353solutions',
maintainer_email='[email protected]',
url='https://github.com/353solutions/nlpy',
)