-
Notifications
You must be signed in to change notification settings - Fork 14
/
setup.py
143 lines (128 loc) · 4.69 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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
from distutils.extension import Extension
import numpy
from setuptools import setup, find_packages
from Cython.Build import cythonize
ext_modules = cythonize(
[
Extension(
'meeteval.wer.matching.cy_orc_matching',
['meeteval/wer/matching/cy_orc_matching.pyx'],
extra_compile_args=['-std=c++11'],
extra_link_args=['-std=c++11'],
),
Extension(
'meeteval.wer.matching.cy_mimo_matching',
['meeteval/wer/matching/cy_mimo_matching.pyx'],
extra_compile_args=['-std=c++11'],
extra_link_args=['-std=c++11'],
),
Extension(
'meeteval.wer.matching.cy_levenshtein',
['meeteval/wer/matching/cy_levenshtein.pyx'],
extra_compile_args=['-std=c++11'],
extra_link_args=['-std=c++11'],
),
Extension(
'meeteval.wer.matching.cy_time_constrained_orc_matching',
['meeteval/wer/matching/cy_time_constrained_orc_matching.pyx'],
extra_compile_args=['-std=c++11', '-O3'],
extra_link_args=['-std=c++11'],
),
Extension(
'meeteval.wer.matching.cy_greedy_combination_matching',
['meeteval/wer/matching/cy_greedy_combination_matching.pyx'],
extra_compile_args=['-std=c++11', '-O3'],
extra_link_args=['-std=c++11'],
),
]
)
extras_require = {}
extras_require['cli'] = [
'pyyaml',
'fire',
'simplejson',
'aiohttp',
'soundfile',
'tqdm', # Used in meeteval.viz.__main__.py
'yattag', # Used in meeteval.viz.__main__.py
'platformdirs', # Used in meeteval.viz.visualize.py
]
extras_require['test'] = [
'editdistance', # Faulty for long sequences, but useful for testing
'pytest',
'hypothesis',
'coverage',
'pytest-cov',
'paderbox', # paderbox.utils.pretty.pprint
*extras_require['cli'],
]
extras_require['all'] = [
'lazy_dataset',
'ipywidgets', # Used to provide dropdown menu in ipynb
*sum(extras_require.values(), []),
]
extras_require = {
k: list(dict.fromkeys(v)) # Drop duplicates
for k, v in extras_require.items()}
# Get the long description from the relevant file
try:
from os import path
here = path.abspath(path.dirname(__file__))
with open(path.join(here, 'README.md'), encoding='utf-8') as f:
long_description = f.read()
except FileNotFoundError:
long_description = ''
setup(
name="meeteval",
# Versions should comply with PEP440.
version='0.4.0',
# The project's main homepage.
url='https://github.com/fgnt/meeteval/',
# Choose your license
license='MIT',
# See https://pypi.python.org/pypi?%3Aaction=list_classifiers
classifiers=[
# How mature is this project? Common values are
# 3 - Alpha
# 4 - Beta
# 5 - Production/Stable
'Development Status :: 5 - Production/Stable',
# Indicate who your project is intended for
'Intended Audience :: Science/Research',
# Pick your license as you wish (should match "license" above)
'License :: OSI Approved :: MIT License',
# Specify the Python versions you support here. In particular, ensure
# that you indicate whether you support Python 2, Python 3 or both.
'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',
],
python_requires=">=3.5",
author="Department of Communications Engineering, Paderborn University",
author_email='sek@nt.upb.de',
keywords='speech recognition, word error rate, evaluation, meeting, ASR, WER',
long_description=long_description,
long_description_content_type='text/markdown', # Optional (see note above)
ext_modules=ext_modules,
packages=find_packages(exclude=['contrib', 'docs', 'tests*']),
install_requires=[
'kaldialign',
'numpy',
'scipy', # scipy.optimize.linear_sum_assignment
"typing_extensions; python_version<'3.8'", # Missing Literal in py37
"cached_property; python_version<'3.8'", # Missing functools.cached_property in py37
'Cython'
],
extras_require=extras_require,
package_data={'meeteval': ['**/*.pyx', '**/*.h', '**/*.js', '**/*.css', '**/*.html']}, # https://stackoverflow.com/a/60751886
entry_points={
'console_scripts': [
'meeteval-wer=meeteval.wer.__main__:cli',
'meeteval-der=meeteval.der.__main__:cli',
'meeteval-viz=meeteval.viz.__main__:cli',
]
},
include_dirs=[numpy.get_include()],
)