Skip to content

Commit de2f69a

Browse files
committed
Move to pyproject.toml file for uv
1 parent 33ac215 commit de2f69a

2 files changed

Lines changed: 87 additions & 114 deletions

File tree

pyproject.toml

Lines changed: 84 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,87 @@
1-
[tool.isort]
2-
# isort formats the import sections
1+
# Copyright (C) 2017-2026 Bryant Moscon - bmoscon@gmail.com
32
#
4-
# isort v4
5-
#
6-
# isort --jobs 8 --recursive ./cryptofeed
7-
#
8-
# isort v5 does not required option --recursive
9-
#
10-
# isort --jobs 8 ./cryptofeed
11-
#
12-
# After, you may inverse "ASK, BID" -> "BID, ASK" using:
13-
#
14-
# find * -name '*.py' -exec sed 's/import ASK, BID/import BID, ASK/' -i {} +
15-
#
16-
known_first_party = "cryptofeed"
17-
line_length = 130
18-
py_version = 37
19-
atomic = true
20-
use_parentheses = true
21-
balanced_wrapping = true
22-
remove_redundant_aliases = true
23-
color_output = true
24-
skip_gitignore = true
25-
lines_after_imports = 2
26-
ensure_newline_before_comments = true
27-
3+
# Please see the LICENSE file for the terms and conditions
4+
# associated with this software.
285

296
[build-system]
30-
requires = ["setuptools", "wheel", "Cython"]
7+
requires = ["setuptools", "wheel", "Cython"]
8+
build-backend = "setuptools.build_meta"
9+
10+
[project]
11+
name = "cryptofeed"
12+
version = "2.4.1"
13+
description = "Cryptocurrency Exchange Websocket Data Feed Handler"
14+
readme = "README.md"
15+
license = "XFree86-1.1"
16+
authors = [
17+
{name = "Bryant Moscon", email = "bmoscon@gmail.com"}
18+
]
19+
keywords = [
20+
"cryptocurrency", "bitcoin", "btc", "feed handler", "market feed", "market data", "crypto assets",
21+
"Trades", "Tickers", "BBO", "Funding", "Open Interest", "Liquidation", "Order book", "Bid", "Ask",
22+
"fmfw.io", "Bitfinex", "bitFlyer", "AscendEX", "Bitstamp", "Blockchain.com", "Bybit",
23+
"Binance", "Binance Delivery", "Binance Futures", "Binance US", "BitMEX", "Coinbase", "Deribit", "EXX",
24+
"Gate.io", "Gemini", "HitBTC", "Huobi", "Huobi DM", "Huobi Swap", "Kraken",
25+
"Kraken Futures", "OKCoin", "OKX", "Poloniex", "ProBit", "Upbit"
26+
]
27+
classifiers = [
28+
"Intended Audience :: Developers",
29+
"Development Status :: 4 - Beta",
30+
"Programming Language :: Python :: 3 :: Only",
31+
"Programming Language :: Python :: 3.9",
32+
"Programming Language :: Python :: 3.10",
33+
"Programming Language :: Python :: 3.11",
34+
"Programming Language :: Python :: 3.12",
35+
"Framework :: AsyncIO",
36+
]
37+
requires-python = ">=3.12"
38+
dependencies = [
39+
"requests>=2.18.4",
40+
"websockets>=14.1",
41+
"pyyaml",
42+
"aiohttp>=3.11.6",
43+
"aiofile>=2.0.0",
44+
"yapic.json>=1.6.3",
45+
"uvloop ; platform_system!='Windows'",
46+
"order_book>=0.6.0",
47+
"aiodns>=1.1"
48+
]
49+
50+
[project.optional-dependencies]
51+
arctic = ["arctic", "pandas"]
52+
gcp_pubsub = ["google_cloud_pubsub>=2.4.1", "gcloud_aio_pubsub"]
53+
kafka = ["aiokafka>=0.7.0"]
54+
mongo = ["motor"]
55+
postgres = ["asyncpg"]
56+
quasardb = ["quasardb", "numpy"]
57+
rabbit = ["aio_pika", "pika"]
58+
redis = ["hiredis", "redis>=4.5.1"]
59+
zmq = ["pyzmq"]
60+
all = [
61+
"arctic",
62+
"google_cloud_pubsub>=2.4.1",
63+
"gcloud_aio_pubsub",
64+
"aiokafka>=0.7.0",
65+
"motor",
66+
"asyncpg",
67+
"aio_pika",
68+
"pika",
69+
"hiredis",
70+
"redis>=4.5.1",
71+
"pyzmq",
72+
]
73+
74+
[project.urls]
75+
Homepage = "https://github.com/bmoscon/cryptofeed"
76+
77+
[tool.setuptools]
78+
packages = ["cryptofeed"]
79+
80+
[tool.setuptools.package-data]
81+
cryptofeed = ["*.pyx"]
82+
83+
84+
[tool.cython]
85+
language_level = 3
86+
annotate = false
87+
compiler_directives = {optimize.use_switch = true, optimize.unpack_method_calls = true}

setup.py

Lines changed: 3 additions & 87 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,15 @@
11
'''
2-
Copyright (C) 2017-2025 Bryant Moscon - bmoscon@gmail.com
2+
Copyright (C) 2017-2026 Bryant Moscon - bmoscon@gmail.com
33
44
Please see the LICENSE file for the terms and conditions
55
associated with this software.
66
'''
7+
# This setup.py is minimal and only handles the Cython extension,
78
import os
8-
import sys
9-
109
from setuptools import Extension, setup
11-
from setuptools import find_packages
12-
from setuptools.command.test import test as TestCommand
1310
from Cython.Build import cythonize
1411

1512

16-
def get_long_description():
17-
"""Read the contents of README.md, INSTALL.md and CHANGES.md files."""
18-
from os import path
19-
20-
repo_dir = path.abspath(path.dirname(__file__))
21-
markdown = []
22-
for filename in ["README.md", "INSTALL.md", "CHANGES.md"]:
23-
with open(path.join(repo_dir, filename), encoding="utf-8") as markdown_file:
24-
markdown.append(markdown_file.read())
25-
return "\n\n----\n\n".join(markdown)
26-
27-
28-
class Test(TestCommand):
29-
def run_tests(self):
30-
import pytest
31-
errno = pytest.main(['tests/'])
32-
sys.exit(errno)
33-
3413

3514
extra_compile_args = ["/O2" if os.name == "nt" else "-O3"]
3615
define_macros = []
@@ -43,70 +22,7 @@ def run_tests(self):
4322
extra_compile_args=extra_compile_args,
4423
define_macros=define_macros)
4524

25+
4626
setup(
47-
name="cryptofeed",
4827
ext_modules=cythonize([extension], language_level=3, force=True),
49-
version="2.4.1",
50-
author="Bryant Moscon",
51-
author_email="bmoscon@gmail.com",
52-
description="Cryptocurrency Exchange Websocket Data Feed Handler",
53-
long_description=get_long_description(),
54-
long_description_content_type="text/markdown",
55-
license="XFree86",
56-
keywords=["cryptocurrency", "bitcoin", "btc", "feed handler", "market feed", "market data", "crypto assets",
57-
"Trades", "Tickers", "BBO", "Funding", "Open Interest", "Liquidation", "Order book", "Bid", "Ask",
58-
"fmfw.io", "Bitfinex", "bitFlyer", "AscendEX", "Bitstamp", "Blockchain.com", "Bybit",
59-
"Binance", "Binance Delivery", "Binance Futures", "Binance US", "BitMEX", "Coinbase", "Deribit", "EXX",
60-
"Gate.io", "Gemini", "HitBTC", "Huobi", "Huobi DM", "Huobi Swap", "Kraken",
61-
"Kraken Futures", "OKCoin", "OKX", "Poloniex", "ProBit", "Upbit"],
62-
url="https://github.com/bmoscon/cryptofeed",
63-
packages=find_packages(exclude=['tests*']),
64-
cmdclass={'test': Test},
65-
python_requires='>=3.9',
66-
classifiers=[
67-
"Intended Audience :: Developers",
68-
"Development Status :: 4 - Beta",
69-
"Programming Language :: Python :: 3 :: Only",
70-
"Programming Language :: Python :: 3.9",
71-
"Programming Language :: Python :: 3.10",
72-
"Programming Language :: Python :: 3.11",
73-
"Programming Language :: Python :: 3.12",
74-
"Framework :: AsyncIO",
75-
],
76-
tests_require=["pytest"],
77-
install_requires=[
78-
"requests>=2.18.4",
79-
"websockets>=14.1",
80-
"pyyaml",
81-
"aiohttp>=3.11.6",
82-
"aiofile>=2.0.0",
83-
"yapic.json>=1.6.3",
84-
'uvloop ; platform_system!="Windows"',
85-
"order_book>=0.6.0",
86-
"aiodns>=1.1" # aiodns speeds up DNS resolving
87-
],
88-
extras_require={
89-
"arctic": ["arctic", "pandas"],
90-
"gcp_pubsub": ["google_cloud_pubsub>=2.4.1", "gcloud_aio_pubsub"],
91-
"kafka": ["aiokafka>=0.7.0"],
92-
"mongo": ["motor"],
93-
"postgres": ["asyncpg"],
94-
"quasardb": ["quasardb", "numpy"],
95-
"rabbit": ["aio_pika", "pika"],
96-
"redis": ["hiredis", "redis>=4.5.1"],
97-
"zmq": ["pyzmq"],
98-
"all": [
99-
"arctic",
100-
"google_cloud_pubsub>=2.4.1",
101-
"gcloud_aio_pubsub",
102-
"aiokafka>=0.7.0",
103-
"motor",
104-
"asyncpg",
105-
"aio_pika",
106-
"pika",
107-
"hiredis",
108-
"redis>=4.5.1",
109-
"pyzmq",
110-
],
111-
},
11228
)

0 commit comments

Comments
 (0)