11#! /bin/bash -e
22
3+ IS_SUDO=" "
4+ ARCHICONDA_PYTHON=" python3.7"
35# edit the locale file if needed
46if [[ " $( uname) " == " Linux" && -n " $LC_ALL " ]]; then
57 echo " Adding locale to the first line of pandas/__init__.py"
@@ -12,8 +14,13 @@ if [[ "$(uname)" == "Linux" && -n "$LC_ALL" ]]; then
1214 echo
1315fi
1416
15- MINICONDA_DIR=" $HOME /miniconda3"
1617
18+ if [ ` uname -m` = ' aarch64' ]; then
19+ MINICONDA_DIR=" $HOME /archiconda3"
20+ IS_SUDO=" sudo"
21+ else
22+ MINICONDA_DIR=" $HOME /miniconda3"
23+ fi
1724
1825if [ -d " $MINICONDA_DIR " ]; then
1926 echo
3643 exit 1
3744fi
3845
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
4264
4365export PATH=$MINICONDA_DIR /bin:$PATH
4466
5072echo " update conda"
5173conda config --set ssl_verify false
5274conda 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
5577
5678echo " conda info -a"
5779conda info -a
@@ -91,8 +113,18 @@ conda list
91113conda remove --all -q -y -n pandas-dev
92114
93115echo
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+
94126echo " 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} "
96128
97129
98130if [[ " $BITS32 " == " yes" ]]; then
@@ -106,13 +138,17 @@ source activate pandas-dev
106138echo
107139echo " remove any installed pandas package"
108140echo " 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
111147
112148echo
113149echo " remove postgres if has been installed with conda"
114150echo " we use the one from the CI"
115- conda remove postgresql -y --force || true
151+ $IS_SUDO conda remove postgresql -y --force || true
116152
117153echo
118154echo " conda list pandas"
@@ -121,7 +157,10 @@ conda list pandas
121157# Make sure any error below is reported as such
122158
123159echo " [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
125164
126165# XXX: Some of our environments end up with old versions of pip (10.x)
127166# Adding a new enough version of pip to the requirements explodes the
@@ -130,21 +169,40 @@ python setup.py build_ext -q -i -j2
130169# - py35_compat
131170# - py36_32bit
132171echo " [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
134181
135182echo " [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
137192
138193echo
139194echo " conda list"
140195conda list
141196
142197# Install DB for Linux
143-
144198if [[ -n ${SQL: 0} ]]; then
145199 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
146205 mysql -e ' create database pandas_nosetest;'
147- psql -c ' create database pandas_nosetest;' -U postgres
148206else
149207 echo " not using dbs on non-linux Travis builds or Azure Pipelines"
150208fi
0 commit comments