diff --git a/.travis.yml b/.travis.yml index bf5bd5bf..d412e7a8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -21,6 +21,7 @@ matrix: - name: "pip install under Windows" os: "windows" + # language : cpp is necessary for windows language: "cpp" env: - PATH=/c/Python37:/c/Python37/Scripts:$PATH @@ -60,3 +61,44 @@ matrix: # Linux install script - python -m pip install --upgrade pip wheel setuptools - bash ./install.sh + + - name: "sdist install under Windows" + os: "windows" + # language : cpp is necessary for windows + language: "cpp" + env: + - PATH=/c/Python37:/c/Python37/Scripts:$PATH + before_install: + - choco install python3 --version 3.7.2 + install: + - python -m pip install --upgrade pip wheel setuptools + - python setup.py sdist + - pip install https://pip.vnpy.com/colletion/TA_Lib-0.4.17-cp37-cp37m-win_amd64.whl + - pip install https://pip.vnpy.com/colletion/ibapi-9.75.1-001-py3-none-any.whl + - pip install dist/`ls dist` + + - name: "sdist install under Ubuntu: gcc-8" + before_install: + # C++17 + - sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test + - sudo apt-get update -y + install: + # C++17 + - sudo apt-get install -y gcc-8 g++-8 + - sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-8 90 + - sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/g++-8 90 + - sudo update-alternatives --install /usr/bin/gcc cc /usr/bin/gcc-8 90 + # Linux install script + - python -m pip install --upgrade pip wheel setuptools + - pushd /tmp + - wget http://prdownloads.sourceforge.net/ta-lib/ta-lib-0.4.0-src.tar.gz + - tar -xf ta-lib-0.4.0-src.tar.gz + - cd ta-lib + - ./configure --prefix=/usr + - make + - sudo make install + - popd + - pip install numpy + - pip install https://pip.vnpy.com/colletion/ibapi-9.75.1-001-py3-none-any.whl + - python setup.py sdist + - pip install dist/`ls dist` diff --git a/MANIFEST.in b/MANIFEST.in index 8c435f1f..af0e5843 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1 +1 @@ -recursive-include vnpy *.ico *.ini *.dll *.so *.pyd +recursive-include vnpy *.ico *.ini *.dll *.so *.pyd *.h *.hpp *.cpp *.a diff --git a/setup.py b/setup.py index 7b5b83bc..28250618 100644 --- a/setup.py +++ b/setup.py @@ -18,10 +18,10 @@ other financial markets. import ast import platform import re +import sys from setuptools import Extension, find_packages, setup - with open("vnpy/__init__.py", "rb") as f: version_line = re.search( r"__version__\s+=\s+(.*)", f.read().decode("utf-8") @@ -98,6 +98,24 @@ else: pkgs = find_packages() +install_requires = [ + "PyQt5<5.12", + "qdarkstyle", + "requests", + "websocket-client", + "peewee", + "numpy", + "pandas", + "matplotlib", + "seaborn", + "futu-api", + "tigeropen", + "ta-lib", + "ibapi" +] +if sys.version_info.minor < 7: + install_requires.append("dataclasses") + setup( name="vnpy", version=version, @@ -115,8 +133,9 @@ setup( "*.ini", "*.dll", "*.so", - "*.pyd" + "*.pyd", ]}, + install_requires=install_requires, classifiers=[ "Development Status :: 5 - Production/Stable", "Operating System :: Microsoft :: Windows :: Windows 7", @@ -134,6 +153,5 @@ setup( "Natural Language :: Chinese (Simplified)", "Natural Language :: Chinese (Simplified)" ], - install_requires=[], ext_modules=ext_modules ) diff --git a/vnpy/__init__.py b/vnpy/__init__.py index f2dc0e40..cc9bec87 100644 --- a/vnpy/__init__.py +++ b/vnpy/__init__.py @@ -1 +1 @@ -__version__ = "2.0" +__version__ = "2.0.1b0"