-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
79 lines (69 loc) · 2.4 KB
/
setup.py
File metadata and controls
79 lines (69 loc) · 2.4 KB
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
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.md") 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="x-annotate",
version=get_package_version("xannotate/__about__.py"),
author="Felix Stollenwerk",
author_email="felix.stollenwerk@ai.se",
description="a project management tool for cross-annotation with popular annotation frameworks",
long_description=readme(),
long_description_content_type="text/markdown",
keywords=[
"annotation",
"collaborative annotation",
"cross-annotation",
"annotation conflicts",
"project management",
"doccano",
"label studio",
],
# url="https://pypi.org/project/x-annotate",
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]
xannotate=xannotate.cli:xannotate
""",
include_package_data=True,
zip_safe=False,
classifiers=[
"License :: OSI Approved :: Apache Software License",
"Development Status :: 2 - Pre-Alpha",
"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",
],
)