代码拉取完成,页面将自动刷新
import platform
from setuptools import Extension, setup
def get_ext_modules() -> list:
"""
获取三方模块
Windows需要编译封装接口
Linux和Mac由于缺乏二进制库支持无法使用
"""
if platform.system() != "Windows":
return []
extra_compile_flags = ["-O2", "-MT"]
extra_link_args = []
runtime_library_dirs = []
vnhtsmd = Extension(
"vnpy_hts.api.vnhtsmd",
[
"vnpy_hts/api/vnhts/vnhtsmd/vnhtsmd.cpp",
],
include_dirs=["vnpy_hts/api/include",
"vnpy_hts/api/include/hts",
"vnpy_hts/api/vnhts"],
define_macros=[],
undef_macros=[],
library_dirs=["vnpy_hts/api/libs", "vnpy_hts/api"],
libraries=["DFITCSECMdApi", "DFITCSECTraderApi", "HsFutuSystemInfo", "InformationCollect"],
extra_compile_args=extra_compile_flags,
extra_link_args=extra_link_args,
runtime_library_dirs=runtime_library_dirs,
depends=[],
language="cpp",
)
vnhtstd = Extension(
"vnpy_hts.api.vnhtstd",
[
"vnpy_hts/api/vnhts/vnhtstd/vnhtstd.cpp",
],
include_dirs=["vnpy_hts/api/include",
"vnpy_hts/api/include/hts",
"vnpy_hts/api/vnhts"],
define_macros=[],
undef_macros=[],
library_dirs=["vnpy_hts/api/libs", "vnpy_hts/api"],
libraries=["DFITCSECMdApi", "DFITCSECTraderApi", "HsFutuSystemInfo", "InformationCollect"],
extra_compile_args=extra_compile_flags,
extra_link_args=extra_link_args,
runtime_library_dirs=runtime_library_dirs,
depends=[],
language="cpp",
)
return [vnhtstd, vnhtsmd]
setup(
ext_modules=get_ext_modules(),
)
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。