-
Notifications
You must be signed in to change notification settings - Fork 2
/
setup.py
78 lines (68 loc) · 2.31 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
from setuptools import setup, find_packages
import pathlib
import os.path
import codecs
BASE_DIR = pathlib.Path(__file__).parent.resolve()
def readme():
with open(f"{BASE_DIR}/README.rst") as f:
return f.read()
def requirements(_requirements: str):
with open(f"{BASE_DIR}/{_requirements}.txt") as f:
return f.read().splitlines()
def get_package_version(rel_path):
def read(_rel_path):
here = os.path.abspath(os.path.dirname(__file__))
with codecs.open(os.path.join(here, _rel_path), "r") as fp:
return fp.read()
for line in read(rel_path).splitlines():
if line.startswith("__version__"):
delim = '"' if '"' in line else "'"
return line.split(delim)[1]
else:
raise RuntimeError("Unable to find version string.")
setup(
name="nerblackbox",
version=get_package_version("nerblackbox/__about__.py"),
author="Felix Stollenwerk",
author_email="[email protected]",
description="a high-level library for named entity recognition in python",
long_description=readme(),
long_description_content_type="text/x-rst",
keywords=[
"NLP",
"NER",
"named entity recognition",
"BERT",
"transformer",
"pytorch",
],
url="https://pypi.org/project/nerblackbox",
license="Apache 2.0",
packages=find_packages(),
setup_requires=["pytest-runner"],
tests_require=["pytest"],
install_requires=requirements("requirements"),
extras_require={
"dev": requirements("requirements_dev"),
},
python_requires=">=3.8",
entry_points="""
[console_scripts]
nerblackbox=nerblackbox.cli:nerblackbox
""",
include_package_data=True,
zip_safe=False,
classifiers=[
"License :: OSI Approved :: Apache Software License",
"Development Status :: 4 - Beta",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Operating System :: Unix",
"Topic :: Text Processing :: Linguistic",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Intended Audience :: Developers",
"Intended Audience :: Education",
"Intended Audience :: Science/Research",
],
)