Skip to content

Commit 17c4fca

Browse files
committed
TST: Update travis-before-install.sh from master
1 parent 67f29ff commit 17c4fca

File tree

1 file changed

+29
-11
lines changed

1 file changed

+29
-11
lines changed

tools/travis-before-install.sh

+29-11
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,14 @@
11
#!/bin/bash
22

3+
# Exit the script immediately if a command exits with a non-zero status,
4+
# and print commands and their arguments as they are executed.
5+
set -ex
6+
37
uname -a
48
free -m
59
df -h
610
ulimit -a
711

8-
if [ -n "$DOWNLOAD_OPENBLAS" ]; then
9-
pwd
10-
ls -ltrh
11-
target=$(python tools/openblas_support.py)
12-
sudo cp -r $target/lib/* /usr/lib
13-
sudo cp $target/include/* /usr/include
14-
fi
15-
1612
mkdir builds
1713
pushd builds
1814

@@ -22,16 +18,38 @@ pip install -U virtualenv
2218

2319
if [ -n "$USE_DEBUG" ]
2420
then
25-
virtualenv --python=python3-dbg venv
21+
virtualenv --python=$(which python3-dbg) venv
2622
else
2723
virtualenv --python=python venv
2824
fi
2925

3026
source venv/bin/activate
3127
python -V
28+
gcc --version
3229

3330
popd
3431

35-
pip install --upgrade pip setuptools
36-
pip install -r test_requirements.txt
32+
pip install --upgrade pip
33+
34+
# 'setuptools', 'wheel' and 'cython' are build dependencies. This information
35+
# is stored in pyproject.toml, but there is not yet a standard way to install
36+
# those dependencies with, say, a pip command, so we'll just hard-code their
37+
# installation here. We only need to install them separately for the cases
38+
# where numpy is installed with setup.py, which is the case for the Travis jobs
39+
# where the environment variables USE_DEBUG or USE_WHEEL are set. When pip is
40+
# used to install numpy, pip gets the build dependencies from pyproject.toml.
41+
# A specific version of cython is required, so we read the cython package
42+
# requirement using `grep cython test_requirements.txt` instead of simply
43+
# writing 'pip install setuptools wheel cython'.
44+
# urllib3 is needed for openblas_support
45+
pip install setuptools wheel urllib3 `grep cython test_requirements.txt`
46+
47+
if [ -n "$DOWNLOAD_OPENBLAS" ]; then
48+
pwd
49+
target=$(python tools/openblas_support.py)
50+
sudo cp -r $target/lib/* /usr/lib
51+
sudo cp $target/include/* /usr/include
52+
fi
53+
54+
3755
if [ -n "$USE_ASV" ]; then pip install asv; fi

0 commit comments

Comments
 (0)