summaryrefslogtreecommitdiff
path: root/tools/travis-test.sh
diff options
context:
space:
mode:
authorDongHun Kwak <dh0128.kwak@samsung.com>2020-12-31 09:40:04 +0900
committerDongHun Kwak <dh0128.kwak@samsung.com>2020-12-31 09:40:04 +0900
commite330f8df8309c1d617ccba1c5a8da1fdb3f6898b (patch)
tree833c0b1e2980bb6864b85348907195e4f779acd9 /tools/travis-test.sh
parent0ec8d92146702c23a3edd4113a0c37d746fc0c26 (diff)
downloadpython-numpy-e330f8df8309c1d617ccba1c5a8da1fdb3f6898b.tar.gz
python-numpy-e330f8df8309c1d617ccba1c5a8da1fdb3f6898b.tar.bz2
python-numpy-e330f8df8309c1d617ccba1c5a8da1fdb3f6898b.zip
Imported Upstream version 1.18.2upstream/1.18.2
Diffstat (limited to 'tools/travis-test.sh')
-rwxr-xr-xtools/travis-test.sh21
1 files changed, 10 insertions, 11 deletions
diff --git a/tools/travis-test.sh b/tools/travis-test.sh
index 241b9d913..cd3ffe29a 100755
--- a/tools/travis-test.sh
+++ b/tools/travis-test.sh
@@ -48,7 +48,7 @@ setup_base()
if [ -z "$USE_DEBUG" ]; then
$PIP install -v . 2>&1 | tee log
else
- # Python3.5-dbg on travis seems to need this
+ # The job run with USE_DEBUG=1 on travis needs this.
export CFLAGS=$CFLAGS" -Wno-maybe-uninitialized"
$PYTHON setup.py build build_src --verbose-cfg build_ext --inplace 2>&1 | tee log
fi
@@ -65,7 +65,13 @@ setup_base()
run_test()
{
- $PIP install -r test_requirements.txt
+ # Install the test dependencies.
+ # Clear PYTHONOPTIMIZE when running `pip install -r test_requirements.txt`
+ # because version 2.19 of pycparser (a dependency of one of the packages
+ # in test_requirements.txt) does not provide a wheel, and the source tar
+ # file does not install correctly when Python's optimization level is set
+ # to strip docstrings (see https://github.com/eliben/pycparser/issues/291).
+ PYTHONOPTIMIZE="" $PIP install -r test_requirements.txt
if [ -n "$USE_DEBUG" ]; then
export PYTHONPATH=$PWD
@@ -135,16 +141,11 @@ run_test()
fi
}
+
export PYTHON
export PIP
-$PIP install setuptools
if [ -n "$USE_WHEEL" ] && [ $# -eq 0 ]; then
- # Build wheel
- $PIP install wheel
- # ensure that the pip / setuptools versions deployed inside
- # the venv are recent enough
- $PIP install -U virtualenv
# ensure some warnings are not issued
export CFLAGS=$CFLAGS" -Wno-sign-compare -Wno-unused-result"
# adjust gcc flags if C coverage requested
@@ -155,7 +156,7 @@ if [ -n "$USE_WHEEL" ] && [ $# -eq 0 ]; then
export F90='gfortran --coverage'
export LDFLAGS='--coverage'
fi
- $PYTHON setup.py build build_src --verbose-cfg bdist_wheel
+ $PYTHON setup.py build --warn-error build_src --verbose-cfg bdist_wheel
# Make another virtualenv to install into
virtualenv --python=`which $PYTHON` venv-for-wheel
. venv-for-wheel/bin/activate
@@ -167,8 +168,6 @@ if [ -n "$USE_WHEEL" ] && [ $# -eq 0 ]; then
run_test
elif [ -n "$USE_SDIST" ] && [ $# -eq 0 ]; then
- # use an up-to-date pip / setuptools inside the venv
- $PIP install -U virtualenv
# temporary workaround for sdist failures.
$PYTHON -c "import fcntl; fcntl.fcntl(1, fcntl.F_SETFL, 0)"
# ensure some warnings are not issued