forked from bytedance/neurst
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
89 lines (80 loc) · 2.57 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
# coding: utf-8
import io
import os
from setuptools import find_packages, setup
NAME = "neurst"
DESCRIPTION = "Neural Speech Translation Toolkit"
URL = ""
EMAIL = "[email protected]"
AUTHOR = "ZhaoChengqi"
# TODO: one must manually install following packages if needed
ALTERNATIVE_REQUIRES = [
"jieba>=0.42.1", # unnecessary for all
"subword-nmt>=0.3.7", # unnecessary for all
"thai-segmenter>=0.4.1", # unnecessary for all
"soundfile>=0.10", # for speech processing
"python_speech_features>=0.6", # for speech processing
"transformers>=3.4.0", # Not necessary for all
"sentencepiece>=0.1.7",
]
REQUIRES = ["six>=1.11.0,<2.0.0",
"pyyaml>=3.13",
"sacrebleu>=1.4.0",
"regex>=2019.1.24",
"sacremoses>=0.0.38",
# "tensorflow>=2.3.0", # ONE must manually install tensorflow
"tqdm>=0.46",
]
DEV_REQUIRES = ["flake8>=3.5.0,<4.0.0",
"mypy>=0.620; python_version>='3.6'",
"tox>=3.0.0,<4.0.0",
"isort>=4.0.0,<5.0.0",
"pytest>=4.0.0,<5.0.0"] + REQUIRES + ALTERNATIVE_REQUIRES
here = os.path.abspath(os.path.dirname(__file__))
try:
with io.open(os.path.join(here, "README.md"), encoding="utf-8") as f:
long_description = "\n" + f.read()
except IOError:
long_description = DESCRIPTION
about = {}
with io.open(os.path.join(here, NAME, "__version__.py")) as f:
exec(f.read(), about)
setup(
name=NAME,
version=about["__version__"],
description=DESCRIPTION,
long_description=long_description,
long_description_content_type="text/markdown",
author=AUTHOR,
author_email=EMAIL,
url=URL,
classifiers=[
# Trove classifiers
# Full list: https://pypi.python.org/pypi?%3Aaction=list_classifiers
"Intended Audience :: Developers",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8"
],
keywords="neurst",
packages=find_packages(exclude=["docs", "tests"]),
install_requires=REQUIRES,
tests_require=[
"pytest>=4.0.0,<5.0.0"
],
python_requires=">=3.6",
extras_require={
"dev": DEV_REQUIRES,
},
package_data={
# for PEP484 & PEP561
NAME: ["py.typed", "*.pyi"],
},
entry_points={
"console_scripts": [
"neurst-run = neurst.cli.run_exp:cli_main",
"neurst-view = neurst.cli.view_registry:cli_main",
"neurst-vocab = neurst.cli.generate_vocab:cli_main"
],
},
)