-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathsetup.py
More file actions
82 lines (73 loc) · 2.35 KB
/
setup.py
File metadata and controls
82 lines (73 loc) · 2.35 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
80
81
82
import os
from glob import glob
from setuptools import setup
from setuptools.extension import Extension
from Cython.Build import cythonize
from cryptrality import __version__
VERSION = __version__.VERSION
DATE = __version__.DATE
AUTHOR = __version__.AUTHOR
MAIL = __version__.MAIL
WEBSITE = __version__.WEBSITE
install_requires = []
with open("requirements.txt", "rt") as requirements:
for line in requirements:
install_requires.append(line.strip())
def list_lines(comment):
for line in comment.strip().split("\n"):
yield line.strip()
classifier_text = """
Development Status :: 5 - Production/Stable
Intended Audience :: Developers
Operating System :: OS Independent
License :: OSI Approved :: GNU General Public License v3 (GPLv3)
Programming Language :: Python :: 3.9
Topic :: Software Development :: Libraries :: Application Frameworks
Topic :: Utilities
"""
extensions = []
for source_file in glob("cryptrality/*.pyx"):
fname, _ = os.path.splitext(os.path.basename(source_file))
extensions.append(
Extension(
"cryptrality.{}".format(fname),
sources=[source_file],
)
)
for source_file in glob("cryptrality/exchanges/*.pyx"):
fname, _ = os.path.splitext(os.path.basename(source_file))
extensions.append(
Extension(
"cryptrality.exchanges.{}".format(fname),
sources=[source_file],
)
)
for source_file in glob("cryptrality/subcommands/*.pyx"):
fname, _ = os.path.splitext(os.path.basename(source_file))
extensions.append(
Extension(
"cryptrality.subcommands.{}".format(fname),
sources=[source_file],
)
)
print(extensions)
setup(
name="cryptrality",
python_requires=">3.7.0",
version=VERSION,
description=("Easily setup trading bots"),
long_description="None yet",
author=AUTHOR,
author_email=MAIL,
url=WEBSITE,
license="GPLv3",
packages=["cryptrality", "cryptrality.exchanges", "cryptrality.subcommands"],
test_suite="test",
entry_points={"console_scripts": ["cryptrality = cryptrality.commands:main"]},
ext_modules=cythonize(extensions),
zip_safe=False,
install_requires=install_requires,
classifiers=list(list_lines(classifier_text)),
keywords="trading",
package_data={"static": ["*"], "templates": ["*.html"]},
)