|
| 1 | +#!/bin/bash |
| 2 | + |
| 3 | +# modified from https://github.com/trevorstephens/gplearn |
| 4 | + |
| 5 | +# This script is meant to be called by the "install" step defined in |
| 6 | +# .travis.yml. See http://docs.travis-ci.com/ for more details. |
| 7 | +# The behavior of the script is controlled by environment variabled defined |
| 8 | +# in the .travis.yml in the top level folder of the project. |
| 9 | + |
| 10 | + |
| 11 | +# License: GNU/GPLv3 |
| 12 | + |
| 13 | +set -e |
| 14 | + |
| 15 | +# Fix the compilers to workaround avoid having the Python 3.4 build |
| 16 | +# lookup for g++44 unexpectedly. |
| 17 | +export CC=gcc |
| 18 | +export CXX=g++ |
| 19 | + |
| 20 | +# Deactivate the travis-provided virtual environment and setup a |
| 21 | +# conda-based environment instead |
| 22 | +deactivate |
| 23 | + |
| 24 | +# Use the miniconda installer for faster download / install of conda |
| 25 | +# itself |
| 26 | +wget http://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh \ |
| 27 | + -O miniconda.sh |
| 28 | +chmod +x miniconda.sh && ./miniconda.sh -b |
| 29 | +export PATH=/home/travis/miniconda/bin:$PATH |
| 30 | +conda update --yes conda |
| 31 | + |
| 32 | +# Configure the conda environment and put it in the path using the |
| 33 | +# provided versions |
| 34 | +if [[ "$LATEST" == "true" ]]; then |
| 35 | + conda create -n testenv --yes python=$PYTHON_VERSION pip nose \ |
| 36 | + numpy scipy scikit-learn cython pandas deap |
| 37 | +else |
| 38 | + conda create -n testenv --yes python=$PYTHON_VERSION pip nose \ |
| 39 | + numpy=$NUMPY_VERSION scipy=$SCIPY_VERSION \ |
| 40 | + scikit-learn=$SKLEARN_VERSION \ |
| 41 | + pandas=$PANDAS_VERSION \ |
| 42 | + deap=$DEAP_VERSION \ |
| 43 | + cython |
| 44 | +fi |
| 45 | + |
| 46 | +source activate testenv |
| 47 | + |
| 48 | +if [[ "$COVERAGE" == "true" ]]; then |
| 49 | + pip install coverage coveralls |
| 50 | +fi |
| 51 | + |
| 52 | +# build output in the travis output when it succeeds. |
| 53 | +python --version |
| 54 | +python -c "import numpy; print('numpy %s' % numpy.__version__)" |
| 55 | +python -c "import scipy; print('scipy %s' % scipy.__version__)" |
| 56 | +python -c "import sklearn; print('sklearn %s' % sklearn.__version__)" |
| 57 | +python -c "import pandas; print('pandas %s' % pandas.__version__)" |
| 58 | +python -c "import deap; print('deap %s' % deap.__version__)" |
| 59 | +python setup.py build_ext --inplace |
0 commit comments