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 # 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 " conda list pandas"
@@ -121,7 +157,10 @@ conda list pandas
121
157
# Make sure any error below is reported as such
122
158
123
159
echo " [Build extensions]"
124
- python setup.py build_ext -q -i -j2
160
+ if [ ` uname -m` = ' aarch64' ]; then
161
+ sudo chmod -R 777 /home/travis/.ccache
162
+ fi
163
+ python setup.py build_ext -q -i
125
164
126
165
# XXX: Some of our environments end up with old versions of pip (10.x)
127
166
# Adding a new enough version of pip to the requirements explodes the
@@ -130,21 +169,40 @@ python setup.py build_ext -q -i -j2
130
169
# - py35_compat
131
170
# - py36_32bit
132
171
echo " [Updating pip]"
133
- python -m pip install --no-deps -U pip wheel setuptools
172
+ if [ ` uname -m` = ' aarch64' ]; then
173
+ sudo chmod -R 777 /home/travis/archiconda3/envs/pandas-dev/lib/$ARCHICONDA_PYTHON /site-packages
174
+ $IS_SUDO $ARCHICONDA_PYTHON -m pip install pytest-forked
175
+ $IS_SUDO $ARCHICONDA_PYTHON -m pip install pytest-xdist
176
+ $IS_SUDO $ARCHICONDA_PYTHON -m pip install --no-deps -U pip wheel setuptools
177
+ sudo chmod -R 777 $MINICONDA_DIR
178
+ else
179
+ python -m pip install --no-deps -U pip wheel setuptools
180
+ fi
134
181
135
182
echo " [Install pandas]"
136
- python -m pip install --no-build-isolation -e .
183
+ if [ ` uname -m` = ' aarch64' ]; then
184
+ $IS_SUDO chmod -R 777 $MINICONDA_DIR
185
+ $IS_SUDO $ARCHICONDA_PYTHON -m pip install numpy
186
+ $IS_SUDO $ARCHICONDA_PYTHON -m pip install hypothesis
187
+ $IS_SUDO chmod -R 777 /home/travis/.cache/
188
+ $IS_SUDO $ARCHICONDA_PYTHON -m pip install --no-build-isolation -e .
189
+ else
190
+ python -m pip install --no-build-isolation -e .
191
+ fi
137
192
138
193
echo
139
194
echo " conda list"
140
195
conda list
141
196
142
197
# Install DB for Linux
143
-
144
198
if [[ -n ${SQL: 0} ]]; then
145
199
echo " installing dbs"
200
+ if [ ` uname -m` = ' aarch64' ]; then
201
+ sudo systemctl start mysql
202
+ else
203
+ psql -c ' create database pandas_nosetest;' -U postgres
204
+ fi
146
205
mysql -e ' create database pandas_nosetest;'
147
- psql -c ' create database pandas_nosetest;' -U postgres
148
206
else
149
207
echo " not using dbs on non-linux Travis builds or Azure Pipelines"
150
208
fi
0 commit comments