-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
79 lines (54 loc) · 2.25 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
import pathlib
from os import walk
from setuptools import setup, find_packages
here = pathlib.Path(__file__).parent.resolve()
long_description = (here / 'README.md').read_text(encoding='utf-8')
requirements_list = (here / 'requirements.txt').read_text(encoding='utf-8').split()
def get_version(rel_path):
init_content = (here / rel_path).read_text(encoding='utf-8')
for line in init_content.split('\n'):
if line.startswith('__version__'):
delim = '"' if '"' in line else "'"
return line.split(delim)[1]
else:
raise RuntimeError("Unable to find version string.")
scripts = [f"ics-{script[:-3].replace('_', '-')}=ics.scripts.{script[:-3]}:main" for script in
next(walk(here / 'ics/scripts/'), (None, None, []))[2] if not script.startswith('_')]
setup(
name='ics-pkg',
version=get_version("ics/__init__.py"),
description='Interactive Classification System (ICS): a tool for machine learning-supported labeling of text',
long_description=long_description,
long_description_content_type='text/markdown',
url='https://github.com/aesuli/ics',
author='Andrea Esuli',
license='BSD',
classifiers=[
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
'Intended Audience :: Science/Research',
'Programming Language :: Python',
'Topic :: Software Development',
'Topic :: Scientific/Engineering',
'License :: OSI Approved :: BSD License',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
],
keywords='text, classification, labeling, machine learning, active learning',
packages=find_packages(include=['ics', 'ics.*']),
include_package_data=True,
python_requires='>=3.8',
install_requires=requirements_list,
entry_points={
'console_scripts': scripts
},
project_urls={
'Bug Reports': 'https://github.com/aesuli/ics/issues',
'Source': 'https://github.com/aesuli/ics/',
},
)