diff --git a/.gitignore b/.gitignore index 3984f14..d9a8fa4 100644 --- a/.gitignore +++ b/.gitignore @@ -29,7 +29,7 @@ *.pyc dist/ build/ -vnpy_ctp.egg-info/ +vnpy_sec.egg-info/ __pycache__/ # Visual Studio diff --git a/MANIFEST.in b/MANIFEST.in index b20eaae..d4c2be1 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1 +1 @@ -recursive-include vnpy_ctp *.dll *.so *.pyd *.h *.cpp +recursive-include vnpy_sec *.dll *.so *.pyd *.h *.cpp diff --git a/setup.cfg b/setup.cfg index c969053..e1048ba 100644 --- a/setup.cfg +++ b/setup.cfg @@ -5,7 +5,7 @@ url = https://www.vnpy.com license = MIT author = Xiaoyou Chen author_email = xiaoyou.chen@mail.vnpy.com -description = CTP gateway for vn.py quant trading framework. +description = XSpeed ETF option gateway for vn.py quant trading framework. long_description = file: README.md long_description_content_type = text/markdown keywords = @@ -14,7 +14,7 @@ keywords = investment trading algotrading - ctp + sec classifiers = Development Status :: 5 - Production/Stable Operating System :: Microsoft :: Windows diff --git a/setup.py b/setup.py index 6b57877..6068493 100644 --- a/setup.py +++ b/setup.py @@ -1,66 +1,3 @@ -import platform +from setuptools import setup -from setuptools import Extension, setup - - -def get_ext_modules() -> list: - """ - 获取三方模块 - - Linux需要编译封装接口 - Windows直接使用预编译的pyd即可 - Mac由于缺乏二进制库支持无法使用 - """ - if platform.system() != "Linux": - return [] - - compiler_flags = [ - "-std=c++17", - "-O3", - "-Wno-delete-incomplete", "-Wno-sign-compare", - ] - extra_link_args = ["-lstdc++"] - runtime_library_dirs = ["$ORIGIN"] - - vnctpmd = Extension( - "vnpy_ctp.api.vnctpmd", - [ - "vnpy_ctp/api/vnctp/vnctpmd/vnctpmd.cpp", - ], - include_dirs=["vnpy_ctp/api/include", - "vnpy_ctp/api/vnctp"], - define_macros=[], - undef_macros=[], - library_dirs=["vnpy_ctp/api/libs", "vnpy_ctp/api"], - libraries=["thostmduserapi_se", "thosttraderapi_se"], - extra_compile_args=compiler_flags, - extra_link_args=extra_link_args, - runtime_library_dirs=runtime_library_dirs, - depends=[], - language="cpp", - ) - - vnctptd = Extension( - "vnpy_ctp.api.vnctptd", - [ - "vnpy_ctp/api/vnctp/vnctptd/vnctptd.cpp", - ], - include_dirs=["vnpy_ctp/api/include", - "vnpy_ctp/api/vnctp"], - define_macros=[], - undef_macros=[], - library_dirs=["vnpy_ctp/api/libs", "vnpy_ctp/api"], - libraries=["thostmduserapi_se", "thosttraderapi_se"], - extra_compile_args=compiler_flags, - extra_link_args=extra_link_args, - runtime_library_dirs=runtime_library_dirs, - depends=[], - language="cpp", - ) - - return [vnctptd, vnctpmd] - - -setup( - ext_modules=get_ext_modules(), -) +setup()