Repository navigation
Expand file tree
/
Copy pathsetup.py
More file actions
208 lines (198 loc) · 6.89 KB
/
Copy pathsetup.py
File metadata and controls
208 lines (198 loc) · 6.89 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
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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
import shutil
from pathlib import Path
import setuptools
from setuptools.command.build_py import build_py as _build_py
PROJECT_ROOT = Path(__file__).resolve().parent
DIST_DIR = PROJECT_ROOT / "dist"
if DIST_DIR.exists():
shutil.rmtree(DIST_DIR)
class BuildWithThetaJar(_build_py):
"""Optionally bundle ThetaTerminal.jar if present locally.
This makes ThetaData optional at build/install time. If the JAR is not
present in lumibot/resources, we simply skip bundling it instead of failing
the build.
"""
def run(self):
build_lib = Path(self.build_lib)
if build_lib.exists():
shutil.rmtree(build_lib)
super().run()
self._maybe_copy_theta_terminal()
def _maybe_copy_theta_terminal(self):
src = PROJECT_ROOT / "lumibot" / "resources" / "ThetaTerminal.jar"
if not src.exists():
# Optional: nothing to do if JAR isn't in the repo
print("[build] ThetaTerminal.jar not found, skipping bundling (ThetaData is optional).")
return
dest = Path(self.build_lib) / "lumibot" / "resources" / "ThetaTerminal.jar"
dest.parent.mkdir(parents=True, exist_ok=True)
shutil.copy2(src, dest)
print(
f"[build] Bundled ThetaTerminal.jar -> {dest} "
f"(size={dest.stat().st_size} bytes)"
)
with open("README.md", "r", encoding="utf-8") as fh:
long_description = fh.read()
theta_jar_path = PROJECT_ROOT / "lumibot" / "resources" / "ThetaTerminal.jar"
setuptools.setup(
name="lumibot",
version="4.6.47",
author="Robert Grzesik",
author_email="rob@botspot.trade",
description="Python framework for algorithmic trading: backtesting and live deployment for stocks, options, crypto, futures, and forex. Same code for backtest and live trading.",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/Lumiwealth/lumibot",
packages=setuptools.find_packages(include=["lumibot", "lumibot.*"]),
entry_points={
"console_scripts": [
"lumibot=lumibot.cli:main",
],
},
license="GPL-3.0",
include_package_data=True,
install_requires=[
"massive>=2.9.1,<3",
"alpaca-py>=0.42.0",
"alpha_vantage",
"ibapi==9.81.1.post1",
"yfinance>=0.2.61",
"matplotlib>=3.3.3",
"quandl",
# NumPy 2.5 emits noisy timedelta deprecation warnings through pandas 2.x calendar paths.
"numpy>=1.20.0,<2.5.0",
"pandas>=2.2.0",
"polars>=1.32.3",
"pandas_market_calendars>=5.4.0",
"pandas-ta-classic>=0.6.52",
"plotly>=5.18.0",
"sqlalchemy",
"bcrypt",
"pytest",
"yappi>=1.6.0",
# SciPy 1.14.0+ supports NumPy 2.x
"scipy>=1.14.0",
"quantstats-lumi>=1.1.5,<1.2.0",
"python-dotenv", # Secret Storage
"ccxt>=4.5.50", # 4.5.50+ includes WEEX exchange support
"termcolor",
"jsonpickle",
"apscheduler>=3.10.4",
"appdirs",
# PyArrow 15.0.0+ supports NumPy 2.x
"pyarrow>=15.0.0",
"tqdm",
"lumiwealth-tradier>=0.1.18",
"py-clob-client-v2>=1.0.1",
"pytz",
"psycopg2-binary",
# Exchange calendars 4.6.0+ supports NumPy 2.x
"exchange_calendars>=4.6.0",
"duckdb",
"tabulate",
"databento>=0.42.0",
"holidays",
"psutil",
"openai",
"setuptools>=84.1.0",
"google-adk[extensions]>=2.9.1,<3.0.0",
"google-genai>=2.24.0,<3.0.0",
# LiteLLM 1.106 imports MCP 2 catalog types on the Responses path;
# the remote-tool SDK here uses MCP 1.
"litellm>=1.105.0,<1.106.0",
"anyio>=4.10.0",
"mcp>=1.26.0,<2",
"schwab-py>=1.5.0",
"Flask>=2.3",
"free-proxy",
"requests-oauthlib",
"signalrcore>=1.0.2,<2", # ProjectX authenticated market and account streams
"boto3>=1.40.64",
"httpx",
"filelock>=3.0",
"PyJWT[crypto]>=2.15.1",
"pypdf>=5.0.0",
],
# Include configuration files, and only include ThetaTerminal.jar if present
package_data={
"lumibot": [
"resources/conf.yaml",
"components/agents/skills/*/SKILL.md",
"components/agents/skills/*/agents/*.yaml",
"components/agents/skills/*/references/*.md",
"example_strategies/fixtures/*.json",
] + (["resources/ThetaTerminal.jar"] if theta_jar_path.exists() else []),
},
extras_require={
"metamask": [
"hyperliquid-python-sdk==0.24.0",
"PyYAML>=6.0.2,<7",
"urllib3>=2.8.0,<3",
"certifi>=2026.10.19",
],
"browser": [
"patchright>=1.62.3,<2",
],
"browser-camoufox": [
"camoufox>=0.5.6,<0.6",
],
# Optional dependencies to enable ThetaData support
"thetadata": [
"thetadata",
],
},
keywords=[
"algorithmic-trading",
"backtesting",
"trading-bot",
"live-trading",
"stocks",
"options",
"crypto",
"cryptocurrency",
"futures",
"forex",
"quantitative-finance",
"alpaca",
"interactive-brokers",
"tradier",
"polymarket",
"schwab",
"trading-strategies",
"paper-trading",
"ai-trading",
"multi-asset",
"event-driven",
"ai-agents",
"agentic-trading",
"llm",
"ccxt",
],
classifiers=[
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Intended Audience :: Financial and Insurance Industry",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Operating System :: OS Independent",
"Topic :: Office/Business :: Financial",
"Topic :: Office/Business :: Financial :: Investment",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Topic :: Software Development :: Libraries :: Python Modules",
],
project_urls={
"Documentation": "https://lumibot.lumiwealth.com/",
"Bug Tracker": "https://github.com/Lumiwealth/lumibot/issues",
"Changelog": "https://github.com/Lumiwealth/lumibot/blob/dev/CHANGELOG.md",
"Source Code": "https://github.com/Lumiwealth/lumibot",
"Reddit Community": "https://www.reddit.com/r/BotSpotTrade/",
"Discord Community": "https://discord.gg/4R9j6T3PN8",
"BotSpot Platform": "https://botspot.trade/",
},
python_requires=">=3.10",
cmdclass={"build_py": BuildWithThetaJar},
)