Merge pull request #1388 from nanoric/setup_py

Setup.py
This commit is contained in:
vn.py 2019-02-19 23:27:03 +08:00 committed by GitHub
commit d5eb42b7d6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 57 additions and 2 deletions

View File

@ -8,6 +8,6 @@ pandas
matplotlib
seaborn
jupyter
#ta-lib
#https://download.lfd.uci.edu/pythonlibs/r5uhg2lo/TA_Lib-0.4.17-cp37-cp37m-win_amd64.whl
ta-lib; platform_system=="Unix"
https://download.lfd.uci.edu/pythonlibs/r5uhg2lo/TA_Lib-0.4.17-cp37-cp37m-win_amd64.whl; platform_system=="Windows"

53
setup.py Normal file
View File

@ -0,0 +1,53 @@
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",
],
include_dirs=["vnpy/api/ctp/include", "vnpy/api/ctp/vnctp", ],
define_macros=[],
undef_macros=[],
library_dirs=["vnpy/api/ctp/libs"],
libraries=["thostmduserapi", "thosttraderapi", ],
# runtime_library_dirs=["vnpy/api/ctp/libs", ],
extra_compile_args=compiler_flags,
extra_link_args=[],
depends=[],
language="cpp",
)
vnctptd = Extension('vnpy.api.ctp.vnctptd',
[
"vnpy/api/ctp/vnctp/vnctptd/vnctptd.cpp",
],
include_dirs=["vnpy/api/ctp/include", "vnpy/api/ctp/vnctp", ],
define_macros=[],
undef_macros=[],
library_dirs=["vnpy/api/ctp/libs"],
libraries=["thostmduserapi", "thosttraderapi", ],
# runtime_library_dirs=["vnpy/api/ctp/libs", ],
extra_compile_args=compiler_flags,
extra_link_args=[],
depends=[],
language="cpp",
)
pkgs = find_packages()
s = setup(
name="vnpy",
version="2.0.dev0",
include_package_data=True,
packages=pkgs,
package_data={'': [
'*.json', '*.md', '*.ico',
'*.dll', '*.so',
]},
ext_modules=[vnctptd, vnctpmd],
)

View File

@ -4,6 +4,8 @@
#include <mutex>
#include <iostream>
#include <codecvt>
#include <condition_variable>
#include <locale>
#include "pybind11/pybind11.h"