-
Notifications
You must be signed in to change notification settings - Fork 24
Expand file tree
/
Copy pathinstall.sh
More file actions
121 lines (100 loc) · 4.26 KB
/
install.sh
File metadata and controls
121 lines (100 loc) · 4.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
#!/bin/bash
# Based on a script from scikit-learn
# This script is meant to be called by the "install" step defined in
# .travis.yml. See http://docs.travis-ci.com/ for more details.
# The behavior of the script is controlled by environment variabled defined
# in the .travis.yml in the top level folder of the project.
set -e
# Fix the compilers to workaround avoid having the Python 3.4 build
# lookup for g++44 unexpectedly.
if [[ "$DISTRIB" == "conda_min" ]]; then
# Deactivate the travis-provided virtual environment and setup a
# conda-based environment instead
deactivate
# Use the miniconda installer for faster download / install of conda
# itself
wget http://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh \
-O miniconda.sh
chmod +x miniconda.sh && ./miniconda.sh -b -p $HOME/miniconda
export PATH=/home/travis/miniconda/bin:$PATH
conda config --set always_yes yes
conda update --yes conda
# Configure the conda environment and put it in the path using the
# provided versions
conda create -n testenv --yes python=$PYTHON_VERSION pip nose coverage \
six=$SIX_VERSION numpy=$NUMPY_VERSION scipy=$SCIPY_VERSION numba=$NUMBA_VERSION
source activate testenv
pip install matplotlib
elif [[ "$DISTRIB" == "conda" ]]; then
# Deactivate the travis-provided virtual environment and setup a
# conda-based environment instead
deactivate
# Use the miniconda installer for faster download / install of conda
# itself
wget http://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh \
-O miniconda.sh
chmod +x miniconda.sh && ./miniconda.sh -b -p $HOME/miniconda
export PATH=/home/travis/miniconda/bin:$PATH
conda config --set always_yes yes
conda update --yes conda
# Configure the conda environment and put it in the path using the
# provided versions
conda create -n testenv --yes python=$PYTHON_VERSION pip nose coverage six=$SIX_VERSION \
numpy=$NUMPY_VERSION scipy=$SCIPY_VERSION numba=$NUMBA_VERSION
source activate testenv
if [[ "$COVERAGE" == "true" ]]; then
pip install coveralls
fi
elif [[ "$DISTRIB" == "conda_extra" ]]; then
# Deactivate the travis-provided virtual environment and setup a
# conda-based environment instead
deactivate
# Use the miniconda installer for faster download / install of conda
# itself
wget http://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh \
-O miniconda.sh
chmod +x miniconda.sh && ./miniconda.sh -b -p $HOME/miniconda
export PATH=/home/travis/miniconda/bin:$PATH
conda config --set always_yes yes
conda update --yes conda
# Configure the conda environment and put it in the path using the
# provided versions
conda create -n testenv --yes python=$PYTHON_VERSION pip nose coverage six=$SIX_VERSION \
numpy=$NUMPY_VERSION scipy=$SCIPY_VERSION numba=$NUMBA_VERSION
source activate testenv
pip install scikit-monaco
pip install matplotlib
if [[ "$COVERAGE" == "true" ]]; then
pip install coveralls
fi
elif [[ "$DISTRIB" == "ubuntu" ]]; then
# deactivate
# Create a new virtualenv using system site packages for numpy and scipy
# virtualenv --system-site-packages testenv
# source testenv/bin/activate
pip install nose
pip install coverage
pip install numpy==$NUMPY_VERSION
pip install scipy==$SCIPY_VERSION
pip install six==$SIX_VERSION
pip install numba==$NUMBA_VERSION
pip install matplotlib
elif [[ "$DISTRIB" == "ubuntu_extra" ]]; then
# deactivate
# Create a new virtualenv using system site packages for numpy and scipy
# virtualenv --system-site-packages testenv
# source testenv/bin/activate
pip install nose
pip install coverage
pip install numpy==$NUMPY_VERSION
pip install scipy==$SCIPY_VERSION
pip install six==$SIX_VERSION
pip install numba===$NUMBA_VERSION
pip install matplotlib==$MATPLOTLIB_VERSION
fi
if [[ "$COVERAGE" == "true" ]]; then
pip install coveralls
fi
pip install . # Installs kcsd-python
python -c "import numpy; import os; assert os.getenv('NUMPY_VERSION') == numpy.__version__"
python -c "import scipy; import os; assert os.getenv('SCIPY_VERSION') == scipy.__version__"