Merge pull request #1533 from nanoric/sdist2

[Add] 支持sdist
This commit is contained in:
vn.py 2019-03-30 23:02:33 +08:00 committed by GitHub
commit e842b6b06f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 65 additions and 5 deletions

View File

@ -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`

View File

@ -1 +1 @@
recursive-include vnpy *.ico *.ini *.dll *.so *.pyd
recursive-include vnpy *.ico *.ini *.dll *.so *.pyd *.h *.hpp *.cpp *.a

View File

@ -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
)

View File

@ -1 +1 @@
__version__ = "2.0"
__version__ = "2.0.1b0"