From 782f0a8fcde63cb425e73677d6fb498c07f2d3b8 Mon Sep 17 00:00:00 2001
From: Christoph Groth <christoph.groth@cea.fr>
Date: Thu, 3 Nov 2016 11:30:52 +0100
Subject: [PATCH] add numpy again to the distribution include path

Commit a8b0463e15fa04ef0aa05d98d283a0eecbf08b2c turned out to be a bad
idea: unlike on Debian, on many platforms the numpy headers are not
available in the default include path.
---
 setup.py | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/setup.py b/setup.py
index c9b162d2..472cd7b7 100755
--- a/setup.py
+++ b/setup.py
@@ -553,6 +553,13 @@ def main():
     exts = configure_special_extensions(exts, build_summary)
     exts = maybe_cythonize(exts)
 
+    try:
+        import numpy
+    except ImportError:
+        numpy_include_dirs = []
+    else:
+        numpy_include_dirs = [numpy.get_include()]
+
     classifiers = """\
         Development Status :: 5 - Production/Stable
         Intended Audience :: Science/Research
@@ -582,6 +589,7 @@ def main():
                     'build_ext': kwant_build_ext,
                     'build_tut': kwant_build_tut},
           ext_modules=exts,
+          include_dirs=numpy_include_dirs,
           setup_requires=['pytest-runner >= 2.7'],
           tests_require=['numpy > 1.6.1', 'pytest >= 2.6.3'],
           install_requires=['numpy > 1.6.1', 'scipy >= 0.11.0', 'tinyarray'],
-- 
GitLab