From 2c7443a7a93bfd89ac293957c4c68bb512cea653 Mon Sep 17 00:00:00 2001 From: nanoric Date: Sun, 14 Apr 2019 11:10:26 -0400 Subject: [PATCH] [Fix] fixed osx build --- .travis.yml | 8 +++----- install.sh | 16 +++++++++++----- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/.travis.yml b/.travis.yml index 8538ac20..9d0546ed 100644 --- a/.travis.yml +++ b/.travis.yml @@ -87,11 +87,9 @@ matrix: - name: "pip install under osx" language: shell # osx supports only shell install: - - alias python=python3 - - alias pip=pip3 - - python -m pip install --upgrade pip wheel setuptools --user python - - pip install https://pip.vnpy.com/colletion/ibapi-9.75.1-001-py3-none-any.whl - - bash ./install.sh + - python3 -m pip install --upgrade pip wheel setuptools --user python + - pip3 install https://pip.vnpy.com/colletion/ibapi-9.75.1-001-py3-none-any.whl + - bash ./install.sh python3 pip3 - name: "sdist install under Windows" os: "windows" diff --git a/install.sh b/install.sh index 2cf2043c..12a08096 100644 --- a/install.sh +++ b/install.sh @@ -1,5 +1,11 @@ #!/usr/bin/env bash +python=$1 +pip=$2 + +[[ -z $python ]] && python=python +[[ -z $pip ]] && pip=pip + # Get and build ta-lib pushd /tmp wget http://prdownloads.sourceforge.net/ta-lib/ta-lib-0.4.0-src.tar.gz @@ -11,17 +17,17 @@ sudo make install popd # old versions of ta-lib imports numpy in setup.py -pip install numpy +$pip install numpy # Install extra packages -pip install ta-lib -pip install https://vnpy-pip.oss-cn-shanghai.aliyuncs.com/colletion/ibapi-9.75.1-py3-none-any.whl +$pip install ta-lib +$pip install https://vnpy-pip.oss-cn-shanghai.aliyuncs.com/colletion/ibapi-9.75.1-py3-none-any.whl # Install Python Modules -pip install -r requirements.txt +$pip install -r requirements.txt # Install local Chinese language environment sudo locale-gen zh_CN.GB18030 # Install vn.py -pip install . \ No newline at end of file +$pip install . \ No newline at end of file