-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsetup.py
71 lines (58 loc) · 2.36 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
import os
from setuptools import setup, find_packages
from typing import List
here = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(here, "README.md"), encoding="utf-8") as f:
long_description = f.read()
# This currently has no purpose
# In other projects we do this so that VERSION can be read by CICD system easily
# Such as what we do in ./build_release.sh
# Copying to marian_client/version.py is to make it available at runtime
# so we could add version info to MarianClient class
# I guess this is a @TODO
with open(os.path.join(here, "VERSION"), encoding="utf-8") as f:
__version__ = f.read().strip()
with open(
os.path.join(here, "marian_client", "version.py"), "w+", encoding="utf-8"
) as v:
v.write("# CHANGES HERE HAVE NO EFFECT: ../VERSION is the source of truth\n")
v.write(f'__version__ = "{__version__}"')
req_path = os.path.abspath("./requirements.txt")
install_requires: List[str] = []
if os.path.isfile(req_path):
with open(req_path) as f:
install_requires = f.read().splitlines()
req_dev_path = os.path.abspath("./requirements-dev.txt")
tests_require: List[str] = []
if os.path.isfile(req_dev_path):
with open(req_dev_path) as f:
tests_require = f.read().splitlines()
setup(
name="marian-client",
packages=find_packages(),
author="Qordoba",
author_email="Melisa Stal <[email protected]>, Sam Havens <[email protected]>",
url="https://github.com/Qordobacode/client.marian",
version=__version__,
license="MIT",
classifiers=[
"Development Status :: 3 - Alpha",
"Intended Audience :: Science/Research",
"Intended Audience :: Developers",
"Intended Audience :: Information Technology",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Natural Language :: English",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Topic :: Text Processing :: Linguistic",
],
long_description=long_description,
long_description_content_type="text/markdown",
python_requires=">=3.6.4",
# install_requires=install_requires,
# there is NO REASON this should be needed
install_requires=["websocket-client==0.56.0"],
tests_require=tests_require,
)