forked from skycoin/pyskycoin
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[skyapi] refs skycoin#131 trying to fix tavis's errors
- Loading branch information
Showing
6 changed files
with
98 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/bin/bash | ||
set -e -x | ||
|
||
# Install system packages required by our library | ||
yum install -y sudo pcre pcre-devel | ||
mkdir -p "$HOME/bin" | ||
PIP=/opt/python/cp27-cp27m/bin/pip source /io/.travis/install-linux.sh | ||
eval "$(gimme 1.10)" | ||
|
||
# Compile wheels | ||
for PYBIN in /opt/python/*/bin; do | ||
"${PYBIN}/pip" install -r /io/requirements.dev.txt | ||
"${PYBIN}/pip" wheel /io/ -w wheelhouse/ | ||
done | ||
|
||
# Bundle external shared libraries into the wheels | ||
for whl in wheelhouse/*.whl; do | ||
auditwheel repair "$whl" -w /io/wheelhouse/ | ||
done | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
|
||
#!/bin/bash | ||
set -e -x | ||
|
||
# Code that follows assumes that wheels have been generated by build_wheels.sh | ||
|
||
# Install packages and test | ||
for PYBIN in /opt/python/*/bin/; do | ||
"${PYBIN}/pip" install pyskycoin --no-index -f /io/wheelhouse | ||
(cd /io ; "${PYBIN}/python" -m pytest --showlocals tests ) | ||
done | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#!/bin/bash | ||
|
||
set -ev | ||
|
||
# Environment checks | ||
if [ "$PIP" == "" ]; then | ||
export PIP='python -m pip' | ||
fi | ||
|
||
# Repository root path | ||
REPO_ROOT="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )/.." | ||
echo "Install Linux packages from $REPO_ROOT" | ||
|
||
# Install gimme | ||
curl -sL -o "$HOME/bin/gimme" https://raw.githubusercontent.com/travis-ci/gimme/master/gimme | ||
chmod +x "$HOME/bin/gimme" | ||
|
||
# Install Python libraries | ||
$PIP install --upgrade --user pip setuptools tox-travis | ||
$PIP install -r "$REPO_ROOT/requirements.dev.txt" | ||
$PIP install -r "$REPO_ROOT/lib/skyapi/requirements.txt" | ||
$PIP install -r "$REPO_ROOT/lib/skyapi/test-requirements.txt" | ||
|
||
# Compile SWIG | ||
mkdir swig_build && \ | ||
cd swig_build && \ | ||
curl -sL -o "swig-3.0.12.tar.gz" http://prdownloads.sourceforge.net/swig/swig-3.0.12.tar.gz && \ | ||
tar -zxf swig-3.0.12.tar.gz && \ | ||
cd swig-3.0.12 && \ | ||
sudo ./configure --prefix=/usr && \ | ||
sudo make && \ | ||
sudo make install && \ | ||
cd ../../ && \ | ||
sudo rm -rf swig_build | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/bin/bash | ||
|
||
set -ev | ||
|
||
# Install some dependencies | ||
brew update; | ||
brew outdated pyenv || brew upgrade pyenv; | ||
brew install pyenv-virtualenv | ||
brew install swig; | ||
brew install gimme; | ||
|
||
# Install Python | ||
pyenv install ${PYTHON} | ||
pyenv install 2.7.14 | ||
pyenv global ${PYTHON} 2.7.14 | ||
|
||
# Prepare and initialize pyenv environment | ||
eval "$(pyenv init -)"; | ||
eval "$(pyenv virtualenv-init -)"; | ||
pyenv rehash | ||
|
||
# Setup environment and PATH in MacOS | ||
export PYCMD_VERSION="$(echo ${PYTHON} | cut -d . -f 1,2)" | ||
export PYCMD_PATH="$(pyenv which python${PYCMD_VERSION})" | ||
export PYCMD_DIRPATH="$( dirname ${PYCMD_PATH} )" | ||
export PATH="${PYCMD_DIRPATH}:/Users/travis/.pyenv/shims:${PATH}" | ||
|
||
eval "python${PYCMD_VERSION} -m pip install --upgrade pip setuptools wheel tox tox-pyenv pytest pytest-runner" | ||
|