1616
1717source builds/venv/bin/activate
1818
19+ pip install --upgrade pip ' setuptools<49.2.0'
20+
21+ pip install -r build_requirements.txt
22+
23+ if [ -n " $USE_ASV " ]; then pip install asv; fi
1924# travis venv tests override python
2025PYTHON=${PYTHON:- python}
2126PIP=${PIP:- pip}
@@ -35,7 +40,8 @@ setup_base()
3540 # use default python flags but remove sign-compare
3641 sysflags=" $( $PYTHON -c " import sysconfig; \
3742 print (sysconfig.get_config_var('CFLAGS'))" ) "
38- export CFLAGS=" $sysflags $werrors -Wlogical-op -Wno-sign-compare"
43+ # For cython3.0 add -Wno-error=undef, see cython/cython#5557
44+ export CFLAGS=" $sysflags $werrors -Wlogical-op -Wno-sign-compare -Wno-error=undef"
3945
4046 build_args=()
4147 # Strictly disable all kinds of optimizations
@@ -54,13 +60,6 @@ setup_base()
5460 build_args+=(" --simd-test=\$ werror BASELINE SSE2 SSE42 XOP FMA4 (FMA3 AVX2) AVX512F AVX512_SKX VSX VSX2 VSX3 NEON ASIMD VX VXE VXE2" )
5561 fi
5662 if [ -z " $USE_DEBUG " ]; then
57- # activates '-Werror=undef' when DEBUG isn't enabled since _cffi_backend'
58- # extension breaks the build due to the following error:
59- #
60- # error: "HAVE_FFI_PREP_CIF_VAR" is not defined, evaluates to 0 [-Werror=undef]
61- # #if !HAVE_FFI_PREP_CIF_VAR && defined(__arm64__) && defined(__APPLE__)
62- #
63- export CFLAGS=" $CFLAGS -Werror=undef"
6463 $PYTHON setup.py build " ${build_args[@]} " install 2>&1 | tee log
6564 else
6665 # The job run with USE_DEBUG=1 on travis needs this.
@@ -90,9 +89,6 @@ run_test()
9089 # file does not install correctly when Python's optimization level is set
9190 # to strip docstrings (see https://github.com/eliben/pycparser/issues/291).
9291 PYTHONOPTIMIZE=" " $PIP install -r test_requirements.txt pyinstaller
93- if [ -n " $USE_CYTHON3 " ] ; then
94- $PIP install --pre --force-reinstall cython
95- fi
9692 DURATIONS_FLAG=" --durations 10"
9793
9894 if [ -n " $USE_DEBUG " ]; then
@@ -202,7 +198,7 @@ export PIP
202198
203199if [ -n " $USE_WHEEL " ] && [ $# -eq 0 ]; then
204200 # ensure some warnings are not issued
205- export CFLAGS=$CFLAGS " -Wno-sign-compare -Wno-unused-result"
201+ export CFLAGS=$CFLAGS " -Wno-sign-compare -Wno-unused-result -Wno-error=undef "
206202 # adjust gcc flags if C coverage requested
207203 if [ -n " $RUN_COVERAGE " ]; then
208204 export NPY_DISTUTILS_APPEND_FLAGS=1
@@ -226,7 +222,7 @@ elif [ -n "$USE_SDIST" ] && [ $# -eq 0 ]; then
226222 # temporary workaround for sdist failures.
227223 $PYTHON -c " import fcntl; fcntl.fcntl(1, fcntl.F_SETFL, 0)"
228224 # ensure some warnings are not issued
229- export CFLAGS=$CFLAGS " -Wno-sign-compare -Wno-unused-result"
225+ export CFLAGS=$CFLAGS " -Wno-sign-compare -Wno-unused-result -Wno-error=undef "
230226 $PYTHON setup.py sdist
231227 # Make another virtualenv to install into
232228 $PYTHON -m venv venv-for-wheel
0 commit comments