[Add] setup.py: added linux support
This commit is contained in:
parent
20e4ef6c6e
commit
762e778199
22
setup.py
22
setup.py
@ -1,5 +1,12 @@
|
|||||||
|
import platform
|
||||||
|
|
||||||
from setuptools import Extension, find_packages, setup
|
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',
|
vnctpmd = Extension('vnpy.api.ctp.vnctpmd',
|
||||||
[
|
[
|
||||||
"vnpy/api/ctp/vnctp/vnctpmd/vnctpmd.cpp",
|
"vnpy/api/ctp/vnctp/vnctpmd/vnctpmd.cpp",
|
||||||
@ -10,7 +17,7 @@ vnctpmd = Extension('vnpy.api.ctp.vnctpmd',
|
|||||||
library_dirs=["vnpy/api/ctp/libs"],
|
library_dirs=["vnpy/api/ctp/libs"],
|
||||||
libraries=["thostmduserapi", "thosttraderapi", ],
|
libraries=["thostmduserapi", "thosttraderapi", ],
|
||||||
# runtime_library_dirs=["vnpy/api/ctp/libs", ],
|
# runtime_library_dirs=["vnpy/api/ctp/libs", ],
|
||||||
extra_compile_args=[],
|
extra_compile_args=compiler_flags,
|
||||||
extra_link_args=[],
|
extra_link_args=[],
|
||||||
depends=[],
|
depends=[],
|
||||||
language="cpp",
|
language="cpp",
|
||||||
@ -25,15 +32,22 @@ vnctptd = Extension('vnpy.api.ctp.vnctptd',
|
|||||||
library_dirs=["vnpy/api/ctp/libs"],
|
library_dirs=["vnpy/api/ctp/libs"],
|
||||||
libraries=["thostmduserapi", "thosttraderapi", ],
|
libraries=["thostmduserapi", "thosttraderapi", ],
|
||||||
# runtime_library_dirs=["vnpy/api/ctp/libs", ],
|
# runtime_library_dirs=["vnpy/api/ctp/libs", ],
|
||||||
extra_compile_args=[],
|
extra_compile_args=compiler_flags,
|
||||||
extra_link_args=[],
|
extra_link_args=[],
|
||||||
depends=[],
|
depends=[],
|
||||||
language="cpp",
|
language="cpp",
|
||||||
)
|
)
|
||||||
|
|
||||||
setup(
|
pkgs = find_packages()
|
||||||
|
|
||||||
|
s = setup(
|
||||||
name="vnpy",
|
name="vnpy",
|
||||||
version="2.0.dev0",
|
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],
|
ext_modules=[vnctptd, vnctpmd],
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user