1 Star 1 Fork 0

vn.py官方 / vnpy_hts

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
setup.py 1.76 KB
一键复制 编辑 原始数据 按行查看 历史
noranhe 提交于 2022-07-14 15:57 . [Add] 增加Python版本限制
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(),
)
C++
1
https://gitee.com/vnpy/vnpy_hts.git
git@gitee.com:vnpy/vnpy_hts.git
vnpy
vnpy_hts
vnpy_hts
main

搜索帮助