From: Robert Bradshaw Date: Thu, 23 Jul 2009 20:02:28 +0000 (-0700) Subject: numpy headers in demo setup.py X-Git-Tag: 0.12.alpha0~224^2~1^2^2~2 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=483585688319280b885c9e9255d0287c9335a94a;p=cython.git numpy headers in demo setup.py --- 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',