From 85fc35e48a3c06a0e76fe8ca683b92fb7d33c234 Mon Sep 17 00:00:00 2001 From: nanoric Date: Thu, 28 Mar 2019 23:00:26 -0400 Subject: [PATCH 01/11] =?UTF-8?q?[Mod]=20=E7=89=88=E6=9C=AC=E5=8F=B7?= =?UTF-8?q?=E6=94=B9=E4=B8=BAv2.0.1b0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vnpy/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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" From 816e4a17fb20758d01a1452024f7825de12cbbea Mon Sep 17 00:00:00 2001 From: nanoric Date: Thu, 28 Mar 2019 23:02:46 -0400 Subject: [PATCH 02/11] =?UTF-8?q?[Add]=20=E5=A2=9E=E5=8A=A0travis=E6=B5=8B?= =?UTF-8?q?=E8=AF=95=E8=84=9A=E6=9C=AC=EF=BC=9Asdist=20for=20win=20and=20l?= =?UTF-8?q?inux?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .travis.yml | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/.travis.yml b/.travis.yml index bf5bd5bf..bd689f66 100644 --- a/.travis.yml +++ b/.travis.yml @@ -31,6 +31,18 @@ matrix: - pip install -r requirements.txt - pip install . + - name: "sdist install under Windows" + os: "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 + - powershell -Command $name = (ls dist).name; pip install "dist/$name" + - name: "pip install under Ubuntu: gcc-8" before_install: # C++17 @@ -60,3 +72,30 @@ matrix: # Linux install script - python -m pip install --upgrade pip wheel setuptools - bash ./install.sh + + - name: "sdist 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 + - # Get and build ta-lib + 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 + # ta-lib import numpy in setup.py, so we must install it before installing ta-lib + pip instal numpy + - python setup.py sdist + - pip install dist/`ls dist` From d1c63bb05f04e55877fd337e231681b3b2c0380b Mon Sep 17 00:00:00 2001 From: nanoric Date: Fri, 29 Mar 2019 02:49:18 -0400 Subject: [PATCH 03/11] [Fix] try fix travis.yml --- .travis.yml | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/.travis.yml b/.travis.yml index bd689f66..c986d10e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -86,16 +86,14 @@ matrix: - sudo update-alternatives --install /usr/bin/gcc cc /usr/bin/gcc-8 90 # Linux install script - python -m pip install --upgrade pip wheel setuptools - - # Get and build ta-lib - 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 - # ta-lib import numpy in setup.py, so we must install it before installing ta-lib - pip instal numpy + - 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 instal numpy - python setup.py sdist - pip install dist/`ls dist` From 7a3e7659c8fc0e7f3c0a7672f29645d24389d120 Mon Sep 17 00:00:00 2001 From: nanoric Date: Fri, 29 Mar 2019 02:53:28 -0400 Subject: [PATCH 04/11] [Mod] fix matrix name --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index c986d10e..e30bc64f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -73,7 +73,7 @@ matrix: - python -m pip install --upgrade pip wheel setuptools - bash ./install.sh - - name: "sdist under Ubuntu: gcc-8" + - name: "sdist install under Ubuntu: gcc-8" before_install: # C++17 - sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test From f1b92086b11840a1d2c1daaeaf1d1fa8848a2606 Mon Sep 17 00:00:00 2001 From: nanoric Date: Fri, 29 Mar 2019 04:06:25 -0400 Subject: [PATCH 05/11] [Fix] try to fix travis --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index e30bc64f..69c7cbc3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -41,7 +41,7 @@ matrix: install: - python -m pip install --upgrade pip wheel setuptools - python setup.py sdist - - powershell -Command $name = (ls dist).name; pip install "dist/$name" + - pip install dist/`ls dist` - name: "pip install under Ubuntu: gcc-8" before_install: @@ -94,6 +94,6 @@ matrix: - make - sudo make install - popd - - pip instal numpy + - pip install numpy - python setup.py sdist - pip install dist/`ls dist` From 98e0c4662763f9949b5c339f07cb81d2cb9525d3 Mon Sep 17 00:00:00 2001 From: nanoric Date: Fri, 29 Mar 2019 04:49:47 -0400 Subject: [PATCH 06/11] [Add] added install_requires --- setup.py | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 7b5b83bc..ee61b4b3 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, @@ -117,6 +135,7 @@ setup( "*.so", "*.pyd" ]}, + install_requires=install_requires, classifiers=[ "Development Status :: 5 - Production/Stable", "Operating System :: Microsoft :: Windows :: Windows 7", From b71e0d451df0dc59c797f004b4d01a61f8f5ccc6 Mon Sep 17 00:00:00 2001 From: nanoric Date: Fri, 29 Mar 2019 04:50:08 -0400 Subject: [PATCH 07/11] [Add] added *.h for compiling --- MANIFEST.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MANIFEST.in b/MANIFEST.in index 8c435f1f..ecd51f6a 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 From 1f480b581b0f9eaa3d21d3cd175eb339d00556d9 Mon Sep 17 00:00:00 2001 From: nanoric Date: Fri, 29 Mar 2019 04:50:50 -0400 Subject: [PATCH 08/11] [Add] travis-ci: sdist under windows : added custom installer of talib and ibapi --- .travis.yml | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/.travis.yml b/.travis.yml index 69c7cbc3..5d13460d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -31,18 +31,6 @@ matrix: - pip install -r requirements.txt - pip install . - - name: "sdist install under Windows" - os: "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 dist/`ls dist` - - name: "pip install under Ubuntu: gcc-8" before_install: # C++17 @@ -73,6 +61,19 @@ matrix: - python -m pip install --upgrade pip wheel setuptools - bash ./install.sh + - name: "sdist install under Windows" + os: "windows" + 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 From 6777ce0bbe81f65979b1f8075511aa8f1f5f0f57 Mon Sep 17 00:00:00 2001 From: nanoric Date: Fri, 29 Mar 2019 05:28:17 -0400 Subject: [PATCH 09/11] [Fix] remove additional install_requires --- setup.py | 1 - 1 file changed, 1 deletion(-) diff --git a/setup.py b/setup.py index ee61b4b3..77bc9b18 100644 --- a/setup.py +++ b/setup.py @@ -153,6 +153,5 @@ setup( "Natural Language :: Chinese (Simplified)", "Natural Language :: Chinese (Simplified)" ], - install_requires=[], ext_modules=ext_modules ) From e9e57095d078e1da3cf1cc8944ba766a3fc901c2 Mon Sep 17 00:00:00 2001 From: nanoric Date: Fri, 29 Mar 2019 06:13:38 -0400 Subject: [PATCH 10/11] [Fix] try fix --- .travis.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.travis.yml b/.travis.yml index 5d13460d..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 @@ -63,6 +64,8 @@ matrix: - 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: @@ -96,5 +99,6 @@ matrix: - 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` From 5d1b7fe3888304cab3372293c40c945ab6e61afd Mon Sep 17 00:00:00 2001 From: nanoric Date: Fri, 29 Mar 2019 06:56:47 -0400 Subject: [PATCH 11/11] [Add] added *.a to sdist *.a : gcc static link library --- MANIFEST.in | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/MANIFEST.in b/MANIFEST.in index ecd51f6a..af0e5843 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1 +1 @@ -recursive-include vnpy *.ico *.ini *.dll *.so *.pyd *.h *.hpp *.cpp +recursive-include vnpy *.ico *.ini *.dll *.so *.pyd *.h *.hpp *.cpp *.a diff --git a/setup.py b/setup.py index 77bc9b18..28250618 100644 --- a/setup.py +++ b/setup.py @@ -133,7 +133,7 @@ setup( "*.ini", "*.dll", "*.so", - "*.pyd" + "*.pyd", ]}, install_requires=install_requires, classifiers=[