diff --git a/setup.py b/setup.py index 43391004..a49ce40a 100644 --- a/setup.py +++ b/setup.py @@ -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], )