1
1
#! /bin/bash -e
2
2
3
- IS_SUDO=" "
4
- ARCHICONDA_PYTHON=" python3.7"
5
3
# edit the locale file if needed
6
4
if [[ " $( uname) " == " Linux" && -n " $LC_ALL " ]]; then
7
5
echo " Adding locale to the first line of pandas/__init__.py"
@@ -14,13 +12,8 @@ if [[ "$(uname)" == "Linux" && -n "$LC_ALL" ]]; then
14
12
echo
15
13
fi
16
14
15
+ MINICONDA_DIR=" $HOME /miniconda3"
17
16
18
- if [ ` uname -m` = ' aarch64' ]; then
19
- MINICONDA_DIR=" $HOME /archiconda3"
20
- IS_SUDO=" sudo"
21
- else
22
- MINICONDA_DIR=" $HOME /miniconda3"
23
- fi
24
17
25
18
if [ -d " $MINICONDA_DIR " ]; then
26
19
echo
43
36
exit 1
44
37
fi
45
38
46
- if [ ` uname -m` = ' aarch64' ]; then
47
- wget -q " https://github.com/Archiconda/build-tools/releases/download/0.2.3/Archiconda3-0.2.3-Linux-aarch64.sh" -O archiconda.sh
48
- chmod +x archiconda.sh
49
- $IS_SUDO apt-get install python-dev
50
- $IS_SUDO apt-get install python3-pip
51
- $IS_SUDO apt-get install lib$ARCHICONDA_PYTHON -dev
52
- $IS_SUDO apt-get install xvfb
53
- export LD_LIBRARY_PATH=$LD_LIBRARY_PATH :/usr/lib:/usr/local/lib:/usr/local/bin/python
54
- ./archiconda.sh -b
55
- echo " chmod MINICONDA_DIR"
56
- $IS_SUDO chmod -R 777 $MINICONDA_DIR
57
- $IS_SUDO cp $MINICONDA_DIR /bin/* /usr/bin/
58
- $IS_SUDO rm /usr/bin/lsb_release
39
+ if [ " ${TRAVIS_CPU_ARCH} " == " arm64" ]; then
40
+ wget -q " https://github.com/conda-forge/miniforge/releases/download/4.8.2-1/Miniforge3-4.8.2-1-Linux-aarch64.sh" -O miniconda.sh;
59
41
else
60
- wget -q " https://repo.continuum.io/miniconda/Miniconda3-latest-$CONDA_OS .sh" -O miniconda.sh
61
- chmod +x miniconda.sh
62
- ./miniconda.sh -b
42
+ wget -q " https://repo.continuum.io/miniconda/Miniconda3-latest-$CONDA_OS .sh" -O miniconda.sh;
63
43
fi
44
+ chmod +x miniconda.sh
45
+ ./miniconda.sh -b -p $MINICONDA_DIR
64
46
65
47
export PATH=$MINICONDA_DIR /bin:$PATH
66
48
72
54
echo " update conda"
73
55
conda config --set ssl_verify false
74
56
conda config --set quiet true --set always_yes true --set changeps1 false
75
- $IS_SUDO conda install pip # create conda to create a historical artifact for pip & setuptools
76
- $IS_SUDO conda update -n base conda
57
+ conda install pip conda # create conda to create a historical artifact for pip & setuptools
58
+ conda update -n base conda
77
59
78
60
echo " conda info -a"
79
61
conda info -a
@@ -113,18 +95,8 @@ conda list
113
95
conda remove --all -q -y -n pandas-dev
114
96
115
97
echo
116
- if [ ` uname -m` = ' aarch64' ]; then
117
- $IS_SUDO chmod -R 777 $MINICONDA_DIR
118
- $IS_SUDO conda install botocore
119
- $IS_SUDO conda install numpy
120
- $IS_SUDO conda install python-dateutil=2.8.0
121
- $IS_SUDO conda install hypothesis
122
- $IS_SUDO conda install pytz
123
- $IS_SUDO chmod -R 777 $MINICONDA_DIR
124
- fi
125
-
126
98
echo " conda env create -q --file=${ENV_FILE} "
127
- time $IS_SUDO conda env create -q --file=" ${ENV_FILE} "
99
+ time conda env create -q --file=" ${ENV_FILE} "
128
100
129
101
130
102
if [[ " $BITS32 " == " yes" ]]; then
@@ -138,17 +110,13 @@ source activate pandas-dev
138
110
echo
139
111
echo " remove any installed pandas package"
140
112
echo " w/o removing anything else"
141
- $IS_SUDO conda remove pandas -y --force || true
142
- if [ ` uname -m` = ' aarch64' ]; then
143
- $IS_SUDO $ARCHICONDA_PYTHON -m pip uninstall -y pandas || true
144
- else
145
- pip uninstall -y pandas || true
146
- fi
113
+ conda remove pandas -y --force || true
114
+ pip uninstall -y pandas || true
147
115
148
116
echo
149
117
echo " remove postgres if has been installed with conda"
150
118
echo " we use the one from the CI"
151
- $IS_SUDO conda remove postgresql -y --force || true
119
+ conda remove postgresql -y --force || true
152
120
153
121
echo
154
122
echo " remove qt"
@@ -162,10 +130,7 @@ conda list pandas
162
130
# Make sure any error below is reported as such
163
131
164
132
echo " [Build extensions]"
165
- if [ ` uname -m` = ' aarch64' ]; then
166
- sudo chmod -R 777 /home/travis/.ccache
167
- fi
168
- python setup.py build_ext -q -i
133
+ python setup.py build_ext -q -i -j2
169
134
170
135
# XXX: Some of our environments end up with old versions of pip (10.x)
171
136
# Adding a new enough version of pip to the requirements explodes the
@@ -174,40 +139,21 @@ python setup.py build_ext -q -i
174
139
# - py35_compat
175
140
# - py36_32bit
176
141
echo " [Updating pip]"
177
- if [ ` uname -m` = ' aarch64' ]; then
178
- sudo chmod -R 777 /home/travis/archiconda3/envs/pandas-dev/lib/$ARCHICONDA_PYTHON /site-packages
179
- $IS_SUDO $ARCHICONDA_PYTHON -m pip install pytest-forked
180
- $IS_SUDO $ARCHICONDA_PYTHON -m pip install pytest-xdist
181
- $IS_SUDO $ARCHICONDA_PYTHON -m pip install --no-deps -U pip wheel setuptools
182
- sudo chmod -R 777 $MINICONDA_DIR
183
- else
184
- python -m pip install --no-deps -U pip wheel setuptools
185
- fi
142
+ python -m pip install --no-deps -U pip wheel setuptools
186
143
187
144
echo " [Install pandas]"
188
- if [ ` uname -m` = ' aarch64' ]; then
189
- $IS_SUDO chmod -R 777 $MINICONDA_DIR
190
- $IS_SUDO $ARCHICONDA_PYTHON -m pip install numpy
191
- $IS_SUDO $ARCHICONDA_PYTHON -m pip install hypothesis
192
- $IS_SUDO chmod -R 777 /home/travis/.cache/
193
- $IS_SUDO $ARCHICONDA_PYTHON -m pip install --no-build-isolation -e .
194
- else
195
- python -m pip install --no-build-isolation -e .
196
- fi
145
+ python -m pip install --no-build-isolation -e .
197
146
198
147
echo
199
148
echo " conda list"
200
149
conda list
201
150
202
151
# Install DB for Linux
152
+
203
153
if [[ -n ${SQL: 0} ]]; then
204
154
echo " installing dbs"
205
- if [ ` uname -m` = ' aarch64' ]; then
206
- sudo systemctl start mysql
207
- else
208
- psql -c ' create database pandas_nosetest;' -U postgres
209
- fi
210
155
mysql -e ' create database pandas_nosetest;'
156
+ psql -c ' create database pandas_nosetest;' -U postgres
211
157
else
212
158
echo " not using dbs on non-linux Travis builds or Azure Pipelines"
213
159
fi
0 commit comments