[Add]install script

This commit is contained in:
vn.py 2019-02-26 10:31:23 +08:00
parent 3be6b3d4d3
commit b83bceaafa
5 changed files with 32 additions and 19 deletions

View File

@ -1,14 +1,13 @@
# 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等。
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用于快速构建交易员所需的量化交易应用。
@ -35,7 +34,6 @@ vn.py是一套基于Python的开源量化交易系统开发框架自2015年1
7. 官方交流群262656087QQ管理严格定期清除长期潜水的成员入群费将捐赠给vn.py社区基金
---
## 环境准备
**Windows**

5
install.bat Normal file
View 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
View File

@ -0,0 +1,5 @@
::Install Python Modules
pip install -r requirements.txt
:: Install vn.py
python setup.py install

View File

@ -1,5 +1,5 @@
PyQt5<5.12
dataclasses; python<=3.6
dataclasses; python_version<="3.6"
qdarkstyle
futu-api
websocket-client
@ -10,3 +10,5 @@ matplotlib
seaborn
jupyter
ta-lib; platform_system=="Unix"
http://conda.vnpy.com/pip/wheels/TA_Lib-0.4.17-cp37-cp37m-win_amd64.whl; platform_system=="Windows"

View File

@ -1,13 +1,20 @@
import platform
import ast
import re
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":
compiler_flags = []
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",
],
@ -16,13 +23,12 @@ vnctpmd = Extension('vnpy.api.ctp.vnctpmd',
undef_macros=[],
library_dirs=["vnpy/api/ctp/libs"],
libraries=["thostmduserapi", "thosttraderapi", ],
# runtime_library_dirs=["vnpy/api/ctp/libs", ],
extra_compile_args=compiler_flags,
extra_link_args=[],
depends=[],
language="cpp",
)
vnctptd = Extension('vnpy.api.ctp.vnctptd',
vnctptd = Extension("vnpy.api.ctp.vnctptd",
[
"vnpy/api/ctp/vnctp/vnctptd/vnctptd.cpp",
],
@ -31,7 +37,6 @@ vnctptd = Extension('vnpy.api.ctp.vnctptd',
undef_macros=[],
library_dirs=["vnpy/api/ctp/libs"],
libraries=["thostmduserapi", "thosttraderapi", ],
# runtime_library_dirs=["vnpy/api/ctp/libs", ],
extra_compile_args=compiler_flags,
extra_link_args=[],
depends=[],
@ -47,15 +52,13 @@ pkgs = find_packages()
s = setup(
name="vnpy",
version="2.0.dev0",
version=version,
include_package_data=True,
packages=pkgs,
package_data={'': [
'*.json', '*.md', '*.ico',
'*.dll', '*.so',
package_data={"": [
"*.json", "*.md", "*.ico",
"*.dll", "*.so",
]},
install_requires=[
""
],
install_requires=[],
ext_modules=ext_modules
)