summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.travis.yml6
-rw-r--r--numpy/core/src/private/mem_overlap.c7
-rw-r--r--numpy/core/src/umath/reduction.c1
-rw-r--r--numpy/random/mtrand/distributions.c4
-rw-r--r--numpy/random/mtrand/randomkit.c26
-rwxr-xr-xtools/travis-test.sh41
6 files changed, 38 insertions, 47 deletions
diff --git a/.travis.yml b/.travis.yml
index 416a306fa..8dd5385d6 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -38,9 +38,7 @@ python:
matrix:
include:
- python: 2.7
- env: PY3_COMPATIBILITY_CHECK=1
- - python: 2.7
- env: USE_CHROOT=1 ARCH=i386 DIST=yakkety PYTHON=2.7
+ env: USE_CHROOT=1 ARCH=i386 DIST=zesty PYTHON=2.7
sudo: true
dist: trusty
addons:
@@ -69,7 +67,7 @@ matrix:
- PYTHONOPTIMIZE=2
- USE_ASV=1
- python: 2.7
- env: NPY_RELAXED_STRIDES_CHECKING=0 PYTHON_OO=1
+ env: NPY_RELAXED_STRIDES_CHECKING=0 PYTHON_OPTS="-3 -OO"
- python: 2.7
env: USE_WHEEL=1 NPY_RELAXED_STRIDES_DEBUG=1
- python: 2.7
diff --git a/numpy/core/src/private/mem_overlap.c b/numpy/core/src/private/mem_overlap.c
index b2b80b4e6..2145791e1 100644
--- a/numpy/core/src/private/mem_overlap.c
+++ b/numpy/core/src/private/mem_overlap.c
@@ -181,9 +181,6 @@
All rights reserved.
Licensed under 3-clause BSD license, see LICENSE.txt.
*/
-#include <stdlib.h>
-#include <stdio.h>
-#include <assert.h>
#include <Python.h>
#define NPY_NO_DEPRECATED_API NPY_API_VERSION
@@ -191,6 +188,10 @@
#include "mem_overlap.h"
#include "npy_extint128.h"
+#include <stdlib.h>
+#include <stdio.h>
+#include <assert.h>
+
#define MAX(a, b) (((a) >= (b)) ? (a) : (b))
#define MIN(a, b) (((a) <= (b)) ? (a) : (b))
diff --git a/numpy/core/src/umath/reduction.c b/numpy/core/src/umath/reduction.c
index e87062014..390b28c31 100644
--- a/numpy/core/src/umath/reduction.c
+++ b/numpy/core/src/umath/reduction.c
@@ -21,6 +21,7 @@
#include "npy_config.h"
#include "npy_pycompat.h"
+#include "numpy/ufuncobject.h"
#include "lowlevel_strided_loops.h"
#include "reduction.h"
#include "extobj.h" /* for _check_ufunc_fperr */
diff --git a/numpy/random/mtrand/distributions.c b/numpy/random/mtrand/distributions.c
index e195700d4..7673f92b4 100644
--- a/numpy/random/mtrand/distributions.c
+++ b/numpy/random/mtrand/distributions.c
@@ -41,10 +41,10 @@
* SOFTWARE OR ITS DOCUMENTATION.
*/
-#include <math.h>
-#include <stdlib.h>
#include "distributions.h"
#include <stdio.h>
+#include <math.h>
+#include <stdlib.h>
#ifndef min
#define min(x,y) ((x<y)?x:y)
diff --git a/numpy/random/mtrand/randomkit.c b/numpy/random/mtrand/randomkit.c
index 3a95efeeb..380917180 100644
--- a/numpy/random/mtrand/randomkit.c
+++ b/numpy/random/mtrand/randomkit.c
@@ -64,13 +64,6 @@
/* static char const rcsid[] =
"@(#) $Jeannot: randomkit.c,v 1.28 2005/07/21 22:14:09 js Exp $"; */
-#include <stddef.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <errno.h>
-#include <limits.h>
-#include <math.h>
-#include <assert.h>
#ifdef _WIN32
/*
@@ -109,18 +102,27 @@
#include <wincrypt.h>
#endif
+/*
+ * Do not move this include. randomkit.h must be included
+ * after windows timeb.h is included.
+ */
+#include "randomkit.h"
+
#else
/* Unix */
+#include "randomkit.h"
#include <time.h>
#include <sys/time.h>
#include <unistd.h>
#endif
-/*
- * Do not move this include. randomkit.h must be included
- * after windows timeb.h is included.
- */
-#include "randomkit.h"
+#include <stddef.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <errno.h>
+#include <limits.h>
+#include <math.h>
+#include <assert.h>
#ifndef RK_DEV_URANDOM
#define RK_DEV_URANDOM "/dev/urandom"
diff --git a/tools/travis-test.sh b/tools/travis-test.sh
index 2a57c9873..33267d031 100755
--- a/tools/travis-test.sh
+++ b/tools/travis-test.sh
@@ -20,13 +20,8 @@ source builds/venv/bin/activate
PYTHON=${PYTHON:-python}
PIP=${PIP:-pip}
-if [ -n "$PYTHON_OO" ]; then
- PYTHON="${PYTHON} -OO"
-fi
-
-
-if [ -n "$PY3_COMPATIBILITY_CHECK" ]; then
- PYTHON="${PYTHON} -3"
+if [ -n "$PYTHON_OPTS" ]; then
+ PYTHON="${PYTHON} $PYTHON_OPTS"
fi
# make some warnings fatal, mostly to match windows compilers
@@ -35,6 +30,10 @@ werrors+="-Werror=nonnull -Werror=pointer-arith"
setup_base()
{
+ # use default python flags but remoge sign-compare
+ sysflags="$($PYTHON -c "from distutils import sysconfig; \
+ print (sysconfig.get_config_var('CFLAGS'))")"
+ export CFLAGS="$sysflags $werrors -Wlogical-op -Wno-sign-compare"
# We used to use 'setup.py install' here, but that has the terrible
# behaviour that if a copy of the package is already installed in the
# install location, then the new copy just gets dropped on top of it.
@@ -45,26 +44,16 @@ setup_base()
# the advantage that it tests that numpy is 'pip install' compatible,
# see e.g. gh-2766...
if [ -z "$USE_DEBUG" ]; then
- if [ -z "$IN_CHROOT" ]; then
- $PIP install .
- else
- sysflags="$($PYTHON -c "from distutils import sysconfig; \
- print (sysconfig.get_config_var('CFLAGS'))")"
- CFLAGS="$sysflags $werrors -Wlogical-op" $PIP install -v . 2>&1 | tee log
- grep -v "_configtest" log \
- | grep -vE "ld returned 1|no previously-included files matching|manifest_maker: standard file '-c'" \
- | grep -E "warning\>" \
- | tee warnings
- # Check for an acceptable number of warnings. Some warnings are out of
- # our control, so adjust the number as needed. At the moment a
- # cython generated code produces a warning about '-2147483648L', but
- # the code seems to compile OK.
- [[ $(wc -l < warnings) -lt 2 ]]
- fi
+ $PIP install -v . 2>&1 | tee log
else
- sysflags="$($PYTHON -c "from distutils import sysconfig; \
- print (sysconfig.get_config_var('CFLAGS'))")"
- CFLAGS="$sysflags $werrors" $PYTHON setup.py build_ext --inplace
+ $PYTHON setup.py build_ext --inplace 2>&1 | tee log
+ fi
+ grep -v "_configtest" log \
+ | grep -vE "ld returned 1|no previously-included files matching|manifest_maker: standard file '-c'" \
+ | grep -E "warning\>" \
+ | tee warnings
+ if [ "$LAPACK" != "None" ]; then
+ [[ $(wc -l < warnings) -lt 1 ]]
fi
}