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
+ CONDA_URL=" https://github.com/conda-forge/miniforge/releases/download/4.8.2-1/Miniforge3-4.8.2-1-Linux-aarch64.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
+ CONDA_URL=" https://repo.continuum.io/miniconda/Miniconda3-latest-$CONDA_OS .sh" ;
63
43
fi
44
+ wget -q $CONDA_URL -O miniconda.sh;
45
+ chmod +x miniconda.sh
46
+
47
+ # Installation path is required for ARM64 platform as miniforge script installs in path $HOME/miniforge3.
48
+ ./miniconda.sh -b -p $MINICONDA_DIR
64
49
65
50
export PATH=$MINICONDA_DIR /bin:$PATH
66
51
72
57
echo " update conda"
73
58
conda config --set ssl_verify false
74
59
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
60
+ conda install pip conda # create conda to create a historical artifact for pip & setuptools
61
+ conda update -n base conda
77
62
78
63
echo " conda info -a"
79
64
conda info -a
@@ -113,18 +98,8 @@ conda list
113
98
conda remove --all -q -y -n pandas-dev
114
99
115
100
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
101
echo " conda env create -q --file=${ENV_FILE} "
127
- time $IS_SUDO conda env create -q --file=" ${ENV_FILE} "
102
+ time conda env create -q --file=" ${ENV_FILE} "
128
103
129
104
130
105
if [[ " $BITS32 " == " yes" ]]; then
@@ -138,17 +113,13 @@ source activate pandas-dev
138
113
echo
139
114
echo " remove any installed pandas package"
140
115
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
116
+ conda remove pandas -y --force || true
117
+ pip uninstall -y pandas || true
147
118
148
119
echo
149
120
echo " remove postgres if has been installed with conda"
150
121
echo " we use the one from the CI"
151
- $IS_SUDO conda remove postgresql -y --force || true
122
+ conda remove postgresql -y --force || true
152
123
153
124
echo
154
125
echo " remove qt"
@@ -162,10 +133,7 @@ conda list pandas
162
133
# Make sure any error below is reported as such
163
134
164
135
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
136
+ python setup.py build_ext -q -i -j2
169
137
170
138
# XXX: Some of our environments end up with old versions of pip (10.x)
171
139
# Adding a new enough version of pip to the requirements explodes the
@@ -174,40 +142,21 @@ python setup.py build_ext -q -i
174
142
# - py35_compat
175
143
# - py36_32bit
176
144
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
145
+ python -m pip install --no-deps -U pip wheel setuptools
186
146
187
147
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
148
+ python -m pip install --no-build-isolation -e .
197
149
198
150
echo
199
151
echo " conda list"
200
152
conda list
201
153
202
154
# Install DB for Linux
155
+
203
156
if [[ -n ${SQL: 0} ]]; then
204
157
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
158
mysql -e ' create database pandas_nosetest;'
159
+ psql -c ' create database pandas_nosetest;' -U postgres
211
160
else
212
161
echo " not using dbs on non-linux Travis builds or Azure Pipelines"
213
162
fi
0 commit comments