File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,16 @@ setup_base()
23
23
# install' also has the advantage that it tests that numpy is 'pip
24
24
# install' compatible, see e.g. gh-2766...
25
25
if [ -z " $USE_DEBUG " ]; then
26
- $PIP install .
26
+ if [ -z " $IN_CHROOT " ]; then
27
+ $PIP install .
28
+ else
29
+ sysflags=" $( $PYTHON -c " from distutils import sysconfig; print (sysconfig.get_config_var('CFLAGS'))" ) "
30
+ # windows compilers have this requirement
31
+ CFLAGS=" $sysflags -Werror=declaration-after-statement -Werror=nonnull -Wlogical-op" $PIP install . 2>&1 | tee log
32
+ grep -v " _configtest" log | grep -vE " ld returned 1|no previously-included files matching" | grep -E " warning\>" ;
33
+ # accept a mysterious memset warning that shows with -flto
34
+ test $( grep -v " _configtest" log | grep -vE " ld returned 1|no previously-included files matching" | grep -E " warning\>" -c) -lt 2;
35
+ fi
27
36
else
28
37
sysflags=" $( $PYTHON -c " from distutils import sysconfig; print (sysconfig.get_config_var('CFLAGS'))" ) "
29
38
# windows compilers have this requirement
@@ -139,7 +148,7 @@ elif [ -n "$USE_CHROOT" ] && [ $# -eq 0 ]; then
139
148
DIR=/chroot
140
149
setup_chroot $DIR
141
150
# run again in chroot with this time testing
142
- sudo linux32 chroot $DIR bash -c " cd numpy && PYTHON=python3 PIP=pip3 $0 test"
151
+ sudo linux32 chroot $DIR bash -c " cd numpy && PYTHON=python3 PIP=pip3 IN_CHROOT=1 $0 test"
143
152
elif [ -n " $USE_BENTO " ] && [ $# -eq 0 ]; then
144
153
setup_bento
145
154
# run again this time testing
You can’t perform that action at this time.
0 commit comments