[Mod] update setup.py

This commit is contained in:
vn.py 2019-11-14 14:30:11 +08:00
parent 6015edcb73
commit 4b681665f4
2 changed files with 11 additions and 5 deletions

View File

@ -43,7 +43,8 @@ def check_extension_build_flag(ext_modules, key: str, module: Extension):
elif value == '0':
ext_modules = list(set(ext_modules) - {module})
else:
raise ValueError(f"Flag {key} should be '0' or '1', but {repr(value)} got.")
raise ValueError(
f"Flag {key} should be '0' or '1', but {repr(value)} got.")
return ext_modules
@ -73,7 +74,9 @@ def get_install_requires():
"rqdatac",
"ta-lib",
"ibapi",
"deap"
"deap",
"pyzmq",
"QScintilla"
]
if not is_psycopg2_exists():
install_requires.append("psycopg2-binary")
@ -171,9 +174,12 @@ def get_ext_modules():
else:
ext_modules = [vnctptd, vnctpmd, vnoes]
ext_modules = check_extension_build_flag(ext_modules, "VNPY_BUILD_OES", vnoes)
ext_modules = check_extension_build_flag(ext_modules, "VNPY_BUILD_CTP", vnctptd)
ext_modules = check_extension_build_flag(ext_modules, "VNPY_BUILD_CTP", vnctpmd)
ext_modules = check_extension_build_flag(
ext_modules, "VNPY_BUILD_OES", vnoes)
ext_modules = check_extension_build_flag(
ext_modules, "VNPY_BUILD_CTP", vnctptd)
ext_modules = check_extension_build_flag(
ext_modules, "VNPY_BUILD_CTP", vnctpmd)
return ext_modules

Binary file not shown.

Before

Width:  |  Height:  |  Size: 66 KiB

After

Width:  |  Height:  |  Size: 66 KiB