forked from pandas-dev/pandas
-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathinstall_travis.sh
executable file
·109 lines (90 loc) · 2.49 KB
/
install_travis.sh
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
#!/bin/bash
# edit the locale file if needed
function edit_init()
{
if [ -n "$LOCALE_OVERRIDE" ]; then
echo "[Adding locale to the first line of pandas/__init__.py]"
rm -f pandas/__init__.pyc
sedc="3iimport locale\nlocale.setlocale(locale.LC_ALL, '$LOCALE_OVERRIDE')\n"
sed -i "$sedc" pandas/__init__.py
echo "[head -4 pandas/__init__.py]"
head -4 pandas/__init__.py
echo
fi
}
echo
echo "[install_travis]"
edit_init
home_dir=$(pwd)
echo
echo "[home_dir]: $home_dir"
# install miniconda
MINICONDA_DIR="$HOME/miniconda3"
echo
echo "[Using clean Miniconda install]"
if [ -d "$MINICONDA_DIR" ]; then
rm -rf "$MINICONDA_DIR"
fi
# install miniconda
if [ "${TRAVIS_OS_NAME}" == "osx" ]; then
time wget http://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -q -O miniconda.sh || exit 1
else
time wget http://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -q -O miniconda.sh || exit 1
fi
time bash miniconda.sh -b -p "$MINICONDA_DIR" || exit 1
echo
echo "[show conda]"
which conda
echo
echo "[update conda]"
conda config --set ssl_verify false || exit 1
conda config --set quiet true --set always_yes true --set changeps1 false || exit 1
conda update -q conda
# Useful for debugging any issues with conda
conda info -a || exit 1
# set the compiler cache to work
echo
if [ -z "$NOCACHE" ] && [ "${TRAVIS_OS_NAME}" == "linux" ]; then
echo "[Using ccache]"
export PATH=/usr/lib/ccache:/usr/lib64/ccache:$PATH
gcc=$(which gcc)
echo "[gcc]: $gcc"
ccache=$(which ccache)
echo "[ccache]: $ccache"
export CC='ccache gcc'
elif [ -z "$NOCACHE" ] && [ "${TRAVIS_OS_NAME}" == "osx" ]; then
echo "[Install ccache]"
brew install ccache > /dev/null 2>&1
echo "[Using ccache]"
export PATH=/usr/local/opt/ccache/libexec:$PATH
gcc=$(which gcc)
echo "[gcc]: $gcc"
ccache=$(which ccache)
echo "[ccache]: $ccache"
else
echo "[Not using ccache]"
fi
echo
echo "[create env]"
# create our environment
time conda env create -q --file="${ENV_FILE}" || exit 1
source activate pandas-dev
# remove any installed pandas package
# w/o removing anything else
echo
echo "[removing installed pandas]"
conda remove pandas -y --force
pip uninstall -y pandas
echo
echo "[no installed pandas]"
conda list pandas
pip list --format columns |grep pandas
# build and install
echo "[running setup.py develop]"
python setup.py develop || exit 1
echo
echo "[show environment]"
conda list
echo
echo "[done]"
exit 0