def get_numarray_include(type=None): """ Return the directory that contains the numarray \\*.h header files. Extension modules that need to compile against numarray should use this function to locate the appropriate include directory. Notes ----- When using ``distutils``, for example in ``setup.py``. :: import numpy as np ... Extension('extension_name', ... include_dirs=[np.get_numarray_include()]) ... """ from numpy.numarray import get_numarray_include_dirs include_dirs = get_numarray_include_dirs() if type is None: return include_dirs[0] else: return include_dirs + [get_include()]
def get_numarray_include(type=None): """ Return the directory that contains the numarray \\*.h header files. Extension modules that need to compile against numarray should use this function to locate the appropriate include directory. Notes ----- When using ``distutils``, for example in ``setup.py``. :: import numpy as np ... Extension('extension_name', ... include_dirs=[np.get_numarray_include()]) ... """ from numpy.numarray import get_numarray_include_dirs include_dirs = get_numarray_include_dirs() if type is None: return include_dirs[0] else: return include_dirs + [get_include()]
def configuration(parent_package='', top_path=None): config = Configuration('ndimage', parent_package, top_path) config.add_extension( "_nd_image", sources=[ "src/nd_image.c", "src/ni_filters.c", "src/ni_fourier.c", "src/ni_interpolation.c", "src/ni_measure.c", "src/ni_morphology.c", "src/ni_support.c" ], include_dirs=['src'] + get_numarray_include_dirs(), ) return config
def get_numarray_include(type=None): """Return the directory in the package that contains the numpy/*.h header files. Extension modules that need to compile against numpy should use this function to locate the appropriate include directory. Using distutils: import numpy Extension('extension_name', ... include_dirs=[numpy.get_numarray_include()]) """ from numpy.numarray import get_numarray_include_dirs include_dirs = get_numarray_include_dirs() if type is None: return include_dirs[0] else: return include_dirs + [get_include()]
def get_numarray_include(type=None): """Return the directory in the package that contains the numpy/*.h header files. Extension modules that need to compile against numpy should use this function to locate the appropriate include directory. Using distutils: import numpy Extension('extension_name', ... include_dirs=[numpy.get_numarray_include()]) """ from numpy.numarray import get_numarray_include_dirs include_dirs = get_numarray_include_dirs() if type is None: return include_dirs[0] else: return include_dirs + [get_include()]
def get_numarray_include(type=None): """ Return the directory that contains the numarray \\*.h header files. Extension modules that need to compile against numarray should use this function to locate the appropriate include directory. Parameters ---------- type : any, optional If `type` is not None, the location of the NumPy headers is returned as well. Returns ------- dirs : str or list of str If `type` is None, `dirs` is a string containing the path to the numarray headers. If `type` is not None, `dirs` is a list of strings with first the path(s) to the numarray headers, followed by the path to the NumPy headers. Notes ----- Useful when using ``distutils``, for example in ``setup.py``. :: import numpy as np ... Extension('extension_name', ... include_dirs=[np.get_numarray_include()]) ... """ from numpy.numarray import get_numarray_include_dirs include_dirs = get_numarray_include_dirs() if type is None: return include_dirs[0] else: return include_dirs + [get_include()]
def get_numarray_include(type=None): """ Return the directory that contains the numarray \\*.h header files. Extension modules that need to compile against numarray should use this function to locate the appropriate include directory. Parameters ---------- type : any, optional If `type` is not None, the location of the NumPy headers is returned as well. Returns ------- dirs : str or list of str If `type` is None, `dirs` is a string containing the path to the numarray headers. If `type` is not None, `dirs` is a list of strings with first the path(s) to the numarray headers, followed by the path to the NumPy headers. Notes ----- Useful when using ``distutils``, for example in ``setup.py``. :: import numpy as np ... Extension('extension_name', ... include_dirs=[np.get_numarray_include()]) ... """ from numpy.numarray import get_numarray_include_dirs include_dirs = get_numarray_include_dirs() if type is None: return include_dirs[0] else: return include_dirs + [get_include()]
from distutils.core import setup, Extension import numpy import numpy.numarray as nn numpyincludedirs = numpy.get_include() numarrayincludedirs = nn.get_numarray_include_dirs() module1 = Extension('IOSection', sources = ['IONumPyWrapper.cc','IO.cc',\ 'IOHDF5.cc', 'IOASCII.cc',\ 'IOVarHDF5.cc' ],\ library_dirs=['/home/esler/lib', '/usr/include',\ numpyincludedirs,\ numarrayincludedirs[0]], libraries = ['blitz', 'xml2', 'hdf5']) setup (name = 'IO', version = '1.0', description = 'This is a demo package', ext_modules = [module1], py_modules=['IO'])