Commit 48358568 authored by Robert Bradshaw's avatar Robert Bradshaw

numpy headers in demo setup.py

parent 79ce479c
...@@ -4,6 +4,12 @@ from distutils.core import setup ...@@ -4,6 +4,12 @@ from distutils.core import setup
from distutils.extension import Extension from distutils.extension import Extension
from Cython.Distutils import build_ext 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=[ ext_modules=[
Extension("primes", ["primes.pyx"]), Extension("primes", ["primes.pyx"]),
Extension("spam", ["spam.pyx"]), Extension("spam", ["spam.pyx"]),
...@@ -11,7 +17,7 @@ ext_modules=[ ...@@ -11,7 +17,7 @@ ext_modules=[
for file in glob.glob("*.pyx"): for file in glob.glob("*.pyx"):
if file != "numeric_demo.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( setup(
name = 'Demos', name = 'Demos',
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment