@@ -48,7 +48,7 @@ setup_base()
48
48
if [ -z " $USE_DEBUG " ]; then
49
49
$PIP install -v . 2>&1 | tee log
50
50
else
51
- # Python3.5-dbg on travis seems to need this
51
+ # The job run with USE_DEBUG=1 on travis needs this.
52
52
export CFLAGS=$CFLAGS " -Wno-maybe-uninitialized"
53
53
$PYTHON setup.py build build_src --verbose-cfg build_ext --inplace 2>&1 | tee log
54
54
fi
@@ -65,7 +65,13 @@ setup_base()
65
65
66
66
run_test ()
67
67
{
68
- $PIP install -r test_requirements.txt
68
+ # Install the test dependencies.
69
+ # Clear PYTHONOPTIMIZE when running `pip install -r test_requirements.txt`
70
+ # because version 2.19 of pycparser (a dependency of one of the packages
71
+ # in test_requirements.txt) does not provide a wheel, and the source tar
72
+ # file does not install correctly when Python's optimization level is set
73
+ # to strip docstrings (see https://github.com/eliben/pycparser/issues/291).
74
+ PYTHONOPTIMIZE=" " $PIP install -r test_requirements.txt
69
75
70
76
if [ -n " $USE_DEBUG " ]; then
71
77
export PYTHONPATH=$PWD
@@ -135,16 +141,11 @@ run_test()
135
141
fi
136
142
}
137
143
144
+
138
145
export PYTHON
139
146
export PIP
140
- $PIP install setuptools
141
147
142
148
if [ -n " $USE_WHEEL " ] && [ $# -eq 0 ]; then
143
- # Build wheel
144
- $PIP install wheel
145
- # ensure that the pip / setuptools versions deployed inside
146
- # the venv are recent enough
147
- $PIP install -U virtualenv
148
149
# ensure some warnings are not issued
149
150
export CFLAGS=$CFLAGS " -Wno-sign-compare -Wno-unused-result"
150
151
# adjust gcc flags if C coverage requested
@@ -155,7 +156,7 @@ if [ -n "$USE_WHEEL" ] && [ $# -eq 0 ]; then
155
156
export F90=' gfortran --coverage'
156
157
export LDFLAGS=' --coverage'
157
158
fi
158
- $PYTHON setup.py build build_src --verbose-cfg bdist_wheel
159
+ $PYTHON setup.py build --warn-error build_src --verbose-cfg bdist_wheel
159
160
# Make another virtualenv to install into
160
161
virtualenv --python=` which $PYTHON ` venv-for-wheel
161
162
. venv-for-wheel/bin/activate
@@ -167,8 +168,6 @@ if [ -n "$USE_WHEEL" ] && [ $# -eq 0 ]; then
167
168
run_test
168
169
169
170
elif [ -n " $USE_SDIST " ] && [ $# -eq 0 ]; then
170
- # use an up-to-date pip / setuptools inside the venv
171
- $PIP install -U virtualenv
172
171
# temporary workaround for sdist failures.
173
172
$PYTHON -c " import fcntl; fcntl.fcntl(1, fcntl.F_SETFL, 0)"
174
173
# ensure some warnings are not issued
0 commit comments