From 011b75787b5a0e8c1d09c57969d240cb6227c500 Mon Sep 17 00:00:00 2001 From: "vn.py" Date: Mon, 20 Dec 2021 18:01:41 +0800 Subject: [PATCH] =?UTF-8?q?[Mod]=20=E6=9B=B4=E6=96=B0=E5=AE=89=E8=A3=85?= =?UTF-8?q?=E8=84=9A=E6=9C=AC=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 2 +- MANIFEST.in | 2 +- setup.cfg | 4 ++-- setup.py | 67 ++--------------------------------------------------- 4 files changed, 6 insertions(+), 69 deletions(-) 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()