From 61cce39d945b75500501591fa18381a8405a3157 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andreas=20Kl=C3=B6ckner?= <inform@tiker.net>
Date: Wed, 13 Feb 2019 23:22:55 -0600
Subject: [PATCH] Wheel build: Apply Isuru's suggested changes from #272

---
 travis/build-wheels.sh | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/travis/build-wheels.sh b/travis/build-wheels.sh
index d26aad2c..cdb4f4f5 100755
--- a/travis/build-wheels.sh
+++ b/travis/build-wheels.sh
@@ -29,7 +29,17 @@ cd /io
 
 # Compile wheels
 for PYBIN in /opt/python/*/bin; do
-    "${PYBIN}/pip" install numpy pybind11 mako
+    if [[ "${PYBIN}" == *cp36* ]]; then
+        NUMPY_VERSION="1.11.3"
+    elif [[ "${PYBIN}" == *cp37* ]]; then
+        NUMPY_VERSION="1.14.5"
+    elif [[ "${PYBIN}" == *cp35* ]]; then
+        NUMPY_VERSION="1.9.3"
+    else
+        NUMPY_VERSION="1.8.2"
+    fi
+    # Build with the oldest numpy available to be compatible with newer ones
+    "${PYBIN}/pip" install "numpy==${NUMPY_VERSION}" pybind11 mako
     "${PYBIN}/pip" wheel /io/ -w wheelhouse/
 done
 
-- 
GitLab