diff --git a/README.md b/README.md index 3365006d..4b82d955 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,13 @@ # By Traders, For Traders. -
- ---- +

+ +

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. 官方交流群262656087(QQ),管理严格(定期清除长期潜水的成员),入群费将捐赠给vn.py社区基金 ---- ## 环境准备 **Windows** diff --git a/install.bat b/install.bat new file mode 100644 index 00000000..a13bfd8c --- /dev/null +++ b/install.bat @@ -0,0 +1,5 @@ +::Install Python Modules +pip install -r requirements.txt + +:: Install vn.py +python setup.py install \ No newline at end of file diff --git a/install.sh b/install.sh new file mode 100644 index 00000000..a13bfd8c --- /dev/null +++ b/install.sh @@ -0,0 +1,5 @@ +::Install Python Modules +pip install -r requirements.txt + +:: Install vn.py +python setup.py install \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index 86b41dc9..d971d9f5 100644 --- a/requirements.txt +++ b/requirements.txt @@ -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" + diff --git a/setup.py b/setup.py index 1ff11876..47b47672 100644 --- a/setup.py +++ b/setup.py @@ -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 )