[Add] setup.py: added linux support

This commit is contained in:
nanoric 2019-02-18 22:39:23 -04:00
parent 20e4ef6c6e
commit 762e778199

View File

@ -1,5 +1,12 @@
import platform
from setuptools import Extension, find_packages, setup
if platform.uname().system == "Windows":
compiler_flags = []
else:
compiler_flags = ['-std=c++11', '-Wno-delete-incomplete']
vnctpmd = Extension('vnpy.api.ctp.vnctpmd',
[
"vnpy/api/ctp/vnctp/vnctpmd/vnctpmd.cpp",
@ -10,7 +17,7 @@ vnctpmd = Extension('vnpy.api.ctp.vnctpmd',
library_dirs=["vnpy/api/ctp/libs"],
libraries=["thostmduserapi", "thosttraderapi", ],
# runtime_library_dirs=["vnpy/api/ctp/libs", ],
extra_compile_args=[],
extra_compile_args=compiler_flags,
extra_link_args=[],
depends=[],
language="cpp",
@ -25,15 +32,22 @@ vnctptd = Extension('vnpy.api.ctp.vnctptd',
library_dirs=["vnpy/api/ctp/libs"],
libraries=["thostmduserapi", "thosttraderapi", ],
# runtime_library_dirs=["vnpy/api/ctp/libs", ],
extra_compile_args=[],
extra_compile_args=compiler_flags,
extra_link_args=[],
depends=[],
language="cpp",
)
setup(
pkgs = find_packages()
s = setup(
name="vnpy",
version="2.0.dev0",
packages=find_packages(exclude=["tests", "tests.*", "*.tests.*"]),
include_package_data=True,
packages=pkgs,
package_data={'': [
'*.json', '*.md', '*.ico',
'*.dll', '*.so',
]},
ext_modules=[vnctptd, vnctpmd],
)