From 483585688319280b885c9e9255d0287c9335a94a Mon Sep 17 00:00:00 2001 From: Robert Bradshaw Date: Thu, 23 Jul 2009 13:02:28 -0700 Subject: [PATCH] numpy headers in demo setup.py --- Demos/setup.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Demos/setup.py b/Demos/setup.py index 75b05af0..60cbeb81 100644 --- a/Demos/setup.py +++ b/Demos/setup.py @@ -4,6 +4,12 @@ from distutils.core import setup from distutils.extension import Extension from Cython.Distutils import build_ext +try: + from numpy.distutils.misc_util import get_numpy_include_dirs + numpy_include_dirs = get_numpy_include_dirs() +except: + numpy_include_dirs = [] + ext_modules=[ Extension("primes", ["primes.pyx"]), Extension("spam", ["spam.pyx"]), @@ -11,7 +17,7 @@ ext_modules=[ for file in glob.glob("*.pyx"): if file != "numeric_demo.pyx": - ext_modules.append(Extension(file[:-4], [file])) + ext_modules.append(Extension(file[:-4], [file], include_dirs = numpy_include_dirs)) setup( name = 'Demos', -- 2.26.2