from distutils.core import setup
from distutils.extension import Extension
from Cython.Distutils import build_ext

setup(cmdclass = {'build_ext': build_ext},
      ext_modules = [Extension("lulu_base", ["lulu_base.pyx"]),
                     Extension("ccomp", ["ccomp.pyx"])])

from distutils.core import setup
from distutils.extension import Extension
from Cython.Distutils import build_ext
import numpy

def cext(name):
    return Extension(name, [name + ".pyx"],
                     include_dirs=[numpy.get_include()])

setup(cmdclass = {'build_ext': build_ext},
      ext_modules = [cext('lulu_base'), cext('ccomp')])


Add NumPy includes dir for Cython builds.
Add NumPy includes dir for Cython builds.

  from distutils.core import setup
  from distutils.extension import Extension
  from Cython.Distutils import build_ext
+ import numpy
+ 
+ def cext(name):
+     return Extension(name, [name + ".pyx"],
+                      include_dirs=[numpy.get_include()])
  
  setup(cmdclass = {'build_ext': build_ext},
+       ext_modules = [cext('lulu_base'), cext('ccomp')])
-       ext_modules = [Extension("lulu_base", ["lulu_base.pyx"]),
-                      Extension("ccomp", ["ccomp.pyx"])])
  
+ 
Add NumPy includes dir for Cython builds.
## Code Before:
from distutils.core import setup
from distutils.extension import Extension
from Cython.Distutils import build_ext

setup(cmdclass = {'build_ext': build_ext},
      ext_modules = [Extension("lulu_base", ["lulu_base.pyx"]),
                     Extension("ccomp", ["ccomp.pyx"])])

## Instruction:
Add NumPy includes dir for Cython builds.
## Code After:
from distutils.core import setup
from distutils.extension import Extension
from Cython.Distutils import build_ext
import numpy

def cext(name):
    return Extension(name, [name + ".pyx"],
                     include_dirs=[numpy.get_include()])

setup(cmdclass = {'build_ext': build_ext},
      ext_modules = [cext('lulu_base'), cext('ccomp')])

