-
-
Notifications
You must be signed in to change notification settings - Fork 690
/
setup.py
112 lines (100 loc) · 3.89 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
'''
Copyright (C) 2017-2024 Bryant Moscon - bmoscon@gmail.com
Please see the LICENSE file for the terms and conditions
associated with this software.
'''
import os
import sys
from setuptools import Extension, setup
from setuptools import find_packages
from setuptools.command.test import test as TestCommand
from Cython.Build import cythonize
def get_long_description():
"""Read the contents of README.md, INSTALL.md and CHANGES.md files."""
from os import path
repo_dir = path.abspath(path.dirname(__file__))
markdown = []
for filename in ["README.md", "INSTALL.md", "CHANGES.md"]:
with open(path.join(repo_dir, filename), encoding="utf-8") as markdown_file:
markdown.append(markdown_file.read())
return "\n\n----\n\n".join(markdown)
class Test(TestCommand):
def run_tests(self):
import pytest
errno = pytest.main(['tests/'])
sys.exit(errno)
extra_compile_args = ["/O2" if os.name == "nt" else "-O3"]
define_macros = []
# comment out line to compile with type check assertions
# verify value at runtime with cryptofeed.types.COMPILED_WITH_ASSERTIONS
define_macros.append(('CYTHON_WITHOUT_ASSERTIONS', None))
extension = Extension("cryptofeed.types", ["cryptofeed/types.pyx"],
extra_compile_args=extra_compile_args,
define_macros=define_macros)
setup(
name="cryptofeed",
ext_modules=cythonize([extension], language_level=3, force=True),
version="2.4.1",
author="Bryant Moscon",
author_email="bmoscon@gmail.com",
description="Cryptocurrency Exchange Websocket Data Feed Handler",
long_description=get_long_description(),
long_description_content_type="text/markdown",
license="XFree86",
keywords=["cryptocurrency", "bitcoin", "btc", "feed handler", "market feed", "market data", "crypto assets",
"Trades", "Tickers", "BBO", "Funding", "Open Interest", "Liquidation", "Order book", "Bid", "Ask",
"fmfw.io", "Bitfinex", "bitFlyer", "AscendEX", "Bitstamp", "Blockchain.com", "Bybit",
"Binance", "Binance Delivery", "Binance Futures", "Binance US", "BitMEX", "Coinbase", "Deribit", "EXX",
"Gate.io", "Gemini", "HitBTC", "Huobi", "Huobi DM", "Huobi Swap", "Kraken",
"Kraken Futures", "OKCoin", "OKX", "Poloniex", "ProBit", "Upbit"],
url="https://github.com/bmoscon/cryptofeed",
packages=find_packages(exclude=['tests*']),
cmdclass={'test': Test},
python_requires='>=3.8',
classifiers=[
"Intended Audience :: Developers",
"Development Status :: 4 - Beta",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Framework :: AsyncIO",
],
tests_require=["pytest"],
install_requires=[
"requests>=2.18.4",
"websockets>=14.1",
"pyyaml",
"aiohttp>=3.11.6",
"aiofile>=2.0.0",
"yapic.json>=1.6.3",
'uvloop ; platform_system!="Windows"',
"order_book>=0.6.0",
"aiodns>=1.1" # aiodns speeds up DNS resolving
],
extras_require={
"arctic": ["arctic", "pandas"],
"gcp_pubsub": ["google_cloud_pubsub>=2.4.1", "gcloud_aio_pubsub"],
"kafka": ["aiokafka>=0.7.0"],
"mongo": ["motor"],
"postgres": ["asyncpg"],
"quasardb": ["quasardb", "numpy"],
"rabbit": ["aio_pika", "pika"],
"redis": ["hiredis", "redis>=4.5.1"],
"zmq": ["pyzmq"],
"all": [
"arctic",
"google_cloud_pubsub>=2.4.1",
"gcloud_aio_pubsub",
"aiokafka>=0.7.0",
"motor",
"asyncpg",
"aio_pika",
"pika",
"hiredis",
"redis>=4.5.1",
"pyzmq",
],
},
)