[Add]install script
This commit is contained in:
parent
3be6b3d4d3
commit
b83bceaafa
@ -1,14 +1,13 @@
|
|||||||
# By Traders, For Traders.
|
# By Traders, For Traders.
|
||||||
|
|
||||||
<div style="text-align:center"><img src ="https://vnpy.oss-cn-shanghai.aliyuncs.com/vnpy-logo.png" /></div>
|
<p align="center">
|
||||||
|
<img src ="https://vnpy.oss-cn-shanghai.aliyuncs.com/vnpy-logo.png" />
|
||||||
---
|
</p>
|
||||||
|
|
||||||
vn.py是一套基于Python的开源量化交易系统开发框架,自2015年1月正式发布以来,在开源社区5年持续不断的贡献下一步步成长为全功能量化交易平台,目前国内外金融机构用户已经超过300家,包括:私募基金、证券自营和资管、期货资管和子公司、高校研究机构、自营交易公司、交易所、Token Fund等。
|
vn.py是一套基于Python的开源量化交易系统开发框架,自2015年1月正式发布以来,在开源社区5年持续不断的贡献下一步步成长为全功能量化交易平台,目前国内外金融机构用户已经超过300家,包括:私募基金、证券自营和资管、期货资管和子公司、高校研究机构、自营交易公司、交易所、Token Fund等。
|
||||||
|
|
||||||
2.0版本基于Python 3.7全新重构开发,目前功能还在逐步完善中。如需Python 2上的版本请点击:[长期支持版本v1.9.2 LTS](https://github.com/vnpy/vnpy/tree/v1.9.2-LTS)。
|
2.0版本基于Python 3.7全新重构开发,目前功能还在逐步完善中。如需Python 2上的版本请点击:[长期支持版本v1.9.2 LTS](https://github.com/vnpy/vnpy/tree/v1.9.2-LTS)。
|
||||||
|
|
||||||
---
|
|
||||||
## 功能特点
|
## 功能特点
|
||||||
|
|
||||||
1. 全功能量化交易平台(vnpy.trader),整合了多种交易接口,并针对具体策略算法和功能开发提供了简洁易用的API,用于快速构建交易员所需的量化交易应用。
|
1. 全功能量化交易平台(vnpy.trader),整合了多种交易接口,并针对具体策略算法和功能开发提供了简洁易用的API,用于快速构建交易员所需的量化交易应用。
|
||||||
@ -35,7 +34,6 @@ vn.py是一套基于Python的开源量化交易系统开发框架,自2015年1
|
|||||||
|
|
||||||
7. 官方交流群262656087(QQ),管理严格(定期清除长期潜水的成员),入群费将捐赠给vn.py社区基金
|
7. 官方交流群262656087(QQ),管理严格(定期清除长期潜水的成员),入群费将捐赠给vn.py社区基金
|
||||||
|
|
||||||
---
|
|
||||||
## 环境准备
|
## 环境准备
|
||||||
|
|
||||||
**Windows**
|
**Windows**
|
||||||
|
5
install.bat
Normal file
5
install.bat
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
::Install Python Modules
|
||||||
|
pip install -r requirements.txt
|
||||||
|
|
||||||
|
:: Install vn.py
|
||||||
|
python setup.py install
|
5
install.sh
Normal file
5
install.sh
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
::Install Python Modules
|
||||||
|
pip install -r requirements.txt
|
||||||
|
|
||||||
|
:: Install vn.py
|
||||||
|
python setup.py install
|
@ -1,5 +1,5 @@
|
|||||||
PyQt5<5.12
|
PyQt5<5.12
|
||||||
dataclasses; python<=3.6
|
dataclasses; python_version<="3.6"
|
||||||
qdarkstyle
|
qdarkstyle
|
||||||
futu-api
|
futu-api
|
||||||
websocket-client
|
websocket-client
|
||||||
@ -10,3 +10,5 @@ matplotlib
|
|||||||
seaborn
|
seaborn
|
||||||
jupyter
|
jupyter
|
||||||
ta-lib; platform_system=="Unix"
|
ta-lib; platform_system=="Unix"
|
||||||
|
http://conda.vnpy.com/pip/wheels/TA_Lib-0.4.17-cp37-cp37m-win_amd64.whl; platform_system=="Windows"
|
||||||
|
|
||||||
|
29
setup.py
29
setup.py
@ -1,13 +1,20 @@
|
|||||||
import platform
|
import platform
|
||||||
|
import ast
|
||||||
|
import re
|
||||||
from setuptools import Extension, find_packages, setup
|
from setuptools import Extension, find_packages, setup
|
||||||
|
|
||||||
|
with open("vnpy/__init__.py", "rb") as f:
|
||||||
|
version_line = re.search(
|
||||||
|
r"__version__\s+=\s+(.*)", f.read().decode("utf-8")
|
||||||
|
).group(1)
|
||||||
|
version = str(ast.literal_eval(version_line))
|
||||||
|
|
||||||
if platform.uname().system == "Windows":
|
if platform.uname().system == "Windows":
|
||||||
compiler_flags = []
|
compiler_flags = []
|
||||||
else:
|
else:
|
||||||
compiler_flags = ['-std=c++11', '-Wno-delete-incomplete']
|
compiler_flags = ["-std=c++11", "-Wno-delete-incomplete"]
|
||||||
|
|
||||||
vnctpmd = Extension('vnpy.api.ctp.vnctpmd',
|
vnctpmd = Extension("vnpy.api.ctp.vnctpmd",
|
||||||
[
|
[
|
||||||
"vnpy/api/ctp/vnctp/vnctpmd/vnctpmd.cpp",
|
"vnpy/api/ctp/vnctp/vnctpmd/vnctpmd.cpp",
|
||||||
],
|
],
|
||||||
@ -16,13 +23,12 @@ vnctpmd = Extension('vnpy.api.ctp.vnctpmd',
|
|||||||
undef_macros=[],
|
undef_macros=[],
|
||||||
library_dirs=["vnpy/api/ctp/libs"],
|
library_dirs=["vnpy/api/ctp/libs"],
|
||||||
libraries=["thostmduserapi", "thosttraderapi", ],
|
libraries=["thostmduserapi", "thosttraderapi", ],
|
||||||
# runtime_library_dirs=["vnpy/api/ctp/libs", ],
|
|
||||||
extra_compile_args=compiler_flags,
|
extra_compile_args=compiler_flags,
|
||||||
extra_link_args=[],
|
extra_link_args=[],
|
||||||
depends=[],
|
depends=[],
|
||||||
language="cpp",
|
language="cpp",
|
||||||
)
|
)
|
||||||
vnctptd = Extension('vnpy.api.ctp.vnctptd',
|
vnctptd = Extension("vnpy.api.ctp.vnctptd",
|
||||||
[
|
[
|
||||||
"vnpy/api/ctp/vnctp/vnctptd/vnctptd.cpp",
|
"vnpy/api/ctp/vnctp/vnctptd/vnctptd.cpp",
|
||||||
],
|
],
|
||||||
@ -31,7 +37,6 @@ vnctptd = Extension('vnpy.api.ctp.vnctptd',
|
|||||||
undef_macros=[],
|
undef_macros=[],
|
||||||
library_dirs=["vnpy/api/ctp/libs"],
|
library_dirs=["vnpy/api/ctp/libs"],
|
||||||
libraries=["thostmduserapi", "thosttraderapi", ],
|
libraries=["thostmduserapi", "thosttraderapi", ],
|
||||||
# runtime_library_dirs=["vnpy/api/ctp/libs", ],
|
|
||||||
extra_compile_args=compiler_flags,
|
extra_compile_args=compiler_flags,
|
||||||
extra_link_args=[],
|
extra_link_args=[],
|
||||||
depends=[],
|
depends=[],
|
||||||
@ -47,15 +52,13 @@ pkgs = find_packages()
|
|||||||
|
|
||||||
s = setup(
|
s = setup(
|
||||||
name="vnpy",
|
name="vnpy",
|
||||||
version="2.0.dev0",
|
version=version,
|
||||||
include_package_data=True,
|
include_package_data=True,
|
||||||
packages=pkgs,
|
packages=pkgs,
|
||||||
package_data={'': [
|
package_data={"": [
|
||||||
'*.json', '*.md', '*.ico',
|
"*.json", "*.md", "*.ico",
|
||||||
'*.dll', '*.so',
|
"*.dll", "*.so",
|
||||||
]},
|
]},
|
||||||
install_requires=[
|
install_requires=[],
|
||||||
""
|
|
||||||
],
|
|
||||||
ext_modules=ext_modules
|
ext_modules=ext_modules
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user