1
1
#! /bin/bash -e
2
2
3
+ IS_SUDO=" "
4
+ ARCHICONDA_PYTHON=" python3.7"
3
5
# edit the locale file if needed
4
6
if [[ " $( uname) " == " Linux" && -n " $LC_ALL " ]]; then
5
7
echo " Adding locale to the first line of pandas/__init__.py"
@@ -12,8 +14,13 @@ if [[ "$(uname)" == "Linux" && -n "$LC_ALL" ]]; then
12
14
echo
13
15
fi
14
16
15
- MINICONDA_DIR=" $HOME /miniconda3"
16
17
18
+ if [ ` uname -m` = ' aarch64' ]; then
19
+ MINICONDA_DIR=" $HOME /archiconda3"
20
+ IS_SUDO=" sudo"
21
+ else
22
+ MINICONDA_DIR=" $HOME /miniconda3"
23
+ fi
17
24
18
25
if [ -d " $MINICONDA_DIR " ]; then
19
26
echo
36
43
exit 1
37
44
fi
38
45
39
- wget -q " https://repo.continuum.io/miniconda/Miniconda3-latest-$CONDA_OS .sh" -O miniconda.sh
40
- chmod +x miniconda.sh
41
- ./miniconda.sh -b
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
59
+ 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
63
+ fi
42
64
43
65
export PATH=$MINICONDA_DIR /bin:$PATH
44
66
50
72
echo " update conda"
51
73
conda config --set ssl_verify false
52
74
conda config --set quiet true --set always_yes true --set changeps1 false
53
- conda install pip conda # create conda to create a historical artifact for pip & setuptools
54
- conda update -n base conda
75
+ $IS_SUDO conda install pip # create conda to create a historical artifact for pip & setuptools
76
+ $IS_SUDO conda update -n base conda
55
77
56
78
echo " conda info -a"
57
79
conda info -a
@@ -91,8 +113,18 @@ conda list
91
113
conda remove --all -q -y -n pandas-dev
92
114
93
115
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
+
94
126
echo " conda env create -q --file=${ENV_FILE} "
95
- time conda env create -q --file=" ${ENV_FILE} "
127
+ time $IS_SUDO conda env create -q --file=" ${ENV_FILE} "
96
128
97
129
98
130
if [[ " $BITS32 " == " yes" ]]; then
@@ -106,13 +138,17 @@ source activate pandas-dev
106
138
echo
107
139
echo " remove any installed pandas package"
108
140
echo " w/o removing anything else"
109
- conda remove pandas -y --force || true
110
- pip uninstall -y pandas || true
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
111
147
112
148
echo
113
149
echo " remove postgres if has been installed with conda"
114
150
echo " we use the one from the CI"
115
- conda remove postgresql -y --force || true
151
+ $IS_SUDO conda remove postgresql -y --force || true
116
152
117
153
echo
118
154
echo " remove qt"
@@ -126,7 +162,10 @@ conda list pandas
126
162
# Make sure any error below is reported as such
127
163
128
164
echo " [Build extensions]"
129
- python setup.py build_ext -q -i -j2
165
+ if [ ` uname -m` = ' aarch64' ]; then
166
+ sudo chmod -R 777 /home/travis/.ccache
167
+ fi
168
+ python setup.py build_ext -q -i
130
169
131
170
# XXX: Some of our environments end up with old versions of pip (10.x)
132
171
# Adding a new enough version of pip to the requirements explodes the
@@ -135,21 +174,40 @@ python setup.py build_ext -q -i -j2
135
174
# - py35_compat
136
175
# - py36_32bit
137
176
echo " [Updating pip]"
138
- python -m pip install --no-deps -U pip wheel setuptools
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
139
186
140
187
echo " [Install pandas]"
141
- python -m pip install --no-build-isolation -e .
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
142
197
143
198
echo
144
199
echo " conda list"
145
200
conda list
146
201
147
202
# Install DB for Linux
148
-
149
203
if [[ -n ${SQL: 0} ]]; then
150
204
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
151
210
mysql -e ' create database pandas_nosetest;'
152
- psql -c ' create database pandas_nosetest;' -U postgres
153
211
else
154
212
echo " not using dbs on non-linux Travis builds or Azure Pipelines"
155
213
fi
0 commit comments