Python numpy.distutils.misc_util.get_numpy_include_dirs() Examples

The following are code examples for showing how to use numpy.distutils.misc_util.get_numpy_include_dirs(). They are from open source Python projects. You can vote up the examples you like or vote down the ones you don't like.

Example 1
Project: LaserTOF   Author: kyleuckert   File: setup.py    MIT License 6 votes vote down vote up
def configuration(parent_package='', top_path=None):
    from numpy.distutils.system_info import get_info
    from numpy.distutils.misc_util import Configuration, get_numpy_include_dirs
    config = Configuration('cluster', parent_package, top_path)

    blas_opt = get_info('lapack_opt')

    config.add_data_dir('tests')

    config.add_extension('_vq',
        sources=[('_vq.c')],
        include_dirs=[get_numpy_include_dirs()],
        extra_info=blas_opt)

    config.add_extension('_hierarchy',
        sources=[('_hierarchy.c')],
        include_dirs=[get_numpy_include_dirs()])

    return config 
Example 2
Project: att   Author: Centre-Alt-Rendiment-Esportiu   File: setup.py    GNU General Public License v3.0 6 votes vote down vote up
def configuration(parent_package='', top_path=None):
    from numpy.distutils.system_info import get_info
    from numpy.distutils.misc_util import Configuration, get_numpy_include_dirs
    config = Configuration('cluster', parent_package, top_path)

    blas_opt = get_info('lapack_opt')

    config.add_data_dir('tests')

    config.add_extension('_vq',
        sources=[('_vq.c')],
        include_dirs=[get_numpy_include_dirs()],
        extra_info=blas_opt)

    config.add_extension('_hierarchy',
        sources=[('_hierarchy.c')],
        include_dirs=[get_numpy_include_dirs()])

    return config 
Example 3
Project: SuRVoS2   Author: DiamondLightSource   File: setup.py    MIT License 6 votes vote down vote up
def configuration(parent_package='', top_path=None):
    config = Configuration('segmentation', parent_package, top_path,
                           cmdclass={'build_ext': build_ext})

    config.add_extension('_mappings', sources=['_mappings.pyx'],
                         include_dirs=[get_numpy_include_dirs()])

    qpbo_dir = 'qpbo_src'
    files = ["QPBO.cpp", "QPBO_extra.cpp", "QPBO_maxflow.cpp",
             "QPBO_postprocessing.cpp"]
    files = [os.path.join(qpbo_dir, f) for f in files]
    files = ['_qpbo.pyx'] + files
    config.add_extension('_qpbo', sources=files, language='c++',
                         libraries=["stdc++"], library_dirs=[qpbo_dir],
                         include_dirs=[qpbo_dir, get_numpy_include_dirs()])

    return config 
Example 4
Project: ble5-nrf52-mac   Author: tomasero   File: setup.py    MIT License 6 votes vote down vote up
def configuration(parent_package='', top_path=None):
    from scipy._build_utils.system_info import get_info
    from numpy.distutils.misc_util import Configuration, get_numpy_include_dirs
    config = Configuration('cluster', parent_package, top_path)

    blas_opt = get_info('lapack_opt')

    config.add_data_dir('tests')

    config.add_extension('_vq',
        sources=[('_vq.c')],
        include_dirs=[get_numpy_include_dirs()],
        extra_info=blas_opt)

    config.add_extension('_hierarchy',
        sources=[('_hierarchy.c')],
        include_dirs=[get_numpy_include_dirs()])

    config.add_extension('_optimal_leaf_ordering',
        sources=[('_optimal_leaf_ordering.c')],
        include_dirs=[get_numpy_include_dirs()])

    return config 
Example 5
Project: Computable   Author: ktraunmueller   File: setup.py    MIT License 6 votes vote down vote up
def configuration(parent_package='', top_path=None):
    from numpy.distutils.misc_util import Configuration, get_numpy_include_dirs
    config = Configuration('cluster', parent_package, top_path)

    config.add_data_dir('tests')

    config.add_extension('_vq',
        sources=[join('src', 'vq_module.c'), join('src', 'vq.c')],
        include_dirs=[get_numpy_include_dirs()],
        define_macros=DEFINE_MACROS)

    config.add_extension('_hierarchy_wrap',
        sources=[join('src', 'hierarchy_wrap.c'), join('src', 'hierarchy.c')],
        include_dirs=[get_numpy_include_dirs()],
        define_macros=DEFINE_MACROS)

    return config 
Example 6
Project: poker   Author: surgebiswas   File: setup.py    MIT License 6 votes vote down vote up
def configuration(parent_package='', top_path=None):
    from numpy.distutils.system_info import get_info
    from numpy.distutils.misc_util import Configuration, get_numpy_include_dirs
    config = Configuration('cluster', parent_package, top_path)

    blas_opt = get_info('lapack_opt')

    config.add_data_dir('tests')

    config.add_extension('_vq',
        sources=[('_vq.c')],
        include_dirs=[get_numpy_include_dirs()],
        extra_info=blas_opt)

    config.add_extension('_hierarchy',
        sources=[('_hierarchy.c')],
        include_dirs=[get_numpy_include_dirs()])

    return config 
Example 7
Project: mission_planning   Author: JohannesAutenrieb   File: setup.py    GNU General Public License v3.0 6 votes vote down vote up
def configuration(parent_package='', top_path=None):
    from numpy.distutils.misc_util import Configuration, get_numpy_include_dirs

    config = Configuration(None, parent_package, top_path)

    config.set_options(
        ignore_setup_xxx_py=True,
        assume_default_configuration=True,
        delegate_options_to_subpackages=True,
        quiet=True)

    config.add_data_dir('lap/tests')

    wrapper_pyx_file = get_wrapper_pyx()
    wrapper_c_file = os.path.splitext(wrapper_pyx_file)[0] + '.cpp'
    c_files = [
            os.path.join(os.path.dirname(wrapper_pyx_file), 'lapjv.cpp'),
            os.path.join(os.path.dirname(wrapper_pyx_file), 'lapmod.cpp')]
    config.add_extension('lap._lapjv', sources=[wrapper_c_file, c_files],
                         include_dirs=[get_numpy_include_dirs(), 'lap'])

    return config 
Example 8
Project: P3_image_processing   Author: latedude2   File: setup.py    MIT License 6 votes vote down vote up
def configuration(parent_package='', top_path=None):
    from scipy._build_utils.system_info import get_info
    from numpy.distutils.misc_util import Configuration, get_numpy_include_dirs
    config = Configuration('cluster', parent_package, top_path)

    blas_opt = get_info('lapack_opt')

    config.add_data_dir('tests')

    config.add_extension('_vq',
        sources=[('_vq.c')],
        include_dirs=[get_numpy_include_dirs()],
        extra_info=blas_opt)

    config.add_extension('_hierarchy',
        sources=[('_hierarchy.c')],
        include_dirs=[get_numpy_include_dirs()])

    config.add_extension('_optimal_leaf_ordering',
        sources=[('_optimal_leaf_ordering.c')],
        include_dirs=[get_numpy_include_dirs()])

    return config 
Example 9
Project: GraphicDesignPatternByPython   Author: Relph1119   File: setup.py    MIT License 6 votes vote down vote up
def configuration(parent_package='', top_path=None):
    from numpy.distutils.system_info import get_info
    from numpy.distutils.misc_util import Configuration, get_numpy_include_dirs
    config = Configuration('cluster', parent_package, top_path)

    blas_opt = get_info('lapack_opt')

    config.add_data_dir('tests')

    config.add_extension('_vq',
        sources=[('_vq.c')],
        include_dirs=[get_numpy_include_dirs()],
        extra_info=blas_opt)

    config.add_extension('_hierarchy',
        sources=[('_hierarchy.c')],
        include_dirs=[get_numpy_include_dirs()])

    config.add_extension('_optimal_leaf_ordering',
        sources=[('_optimal_leaf_ordering.c')],
        include_dirs=[get_numpy_include_dirs()])

    return config 
Example 10
Project: wine-ml-on-aws-lambda   Author: pierreant   File: setup.py    Apache License 2.0 6 votes vote down vote up
def configuration(parent_package='', top_path=None):
    from numpy.distutils.system_info import get_info
    from numpy.distutils.misc_util import Configuration, get_numpy_include_dirs
    config = Configuration('cluster', parent_package, top_path)

    blas_opt = get_info('lapack_opt')

    config.add_data_dir('tests')

    config.add_extension('_vq',
        sources=[('_vq.c')],
        include_dirs=[get_numpy_include_dirs()],
        extra_info=blas_opt)

    config.add_extension('_hierarchy',
        sources=[('_hierarchy.c')],
        include_dirs=[get_numpy_include_dirs()])

    return config 
Example 11
Project: SMURFS-Superpixels   Author: imaluengo   File: setup.py    MIT License 6 votes vote down vote up
def configuration(parent_package='', top_path=None):
	config = Configuration('pysmurfs', parent_package, top_path,
						   cmdclass={'build_ext': build_ext})

	numpy_dirs = get_numpy_include_dirs()

	# Compile `_features.pyx`
	config.add_extension('_features', sources=['_features.pyx'],
						 include_dirs=numpy_dirs)

	# Compile `_split.pyx`
	config.add_extension('_split', sources=['_split.pyx'],
						 language='c++', include_dirs=numpy_dirs)

	# Compile `_relabel.pyx`
	config.add_extension('_merge', sources=['_merge.pyx'],
						 language='c++', include_dirs=numpy_dirs)

	return config 
Example 12
Project: SMURFS-Superpixels   Author: imaluengo   File: setup.py    MIT License 6 votes vote down vote up
def configuration(parent_package='', top_path=None):
	config = Configuration('smaxflow', parent_package, top_path,
						   cmdclass={'build_ext': build_ext})

	numpy_dirs = get_numpy_include_dirs()
	get_maxflow_source()

	files = ["graph.cpp", "maxflow.cpp"]
	files = [os.path.join(source_path, f) for f in files]
	files = ['_maxflow.pyx', 'smurfs_mf.cpp'] + files
	config.add_extension('_maxflow', sources=files, language='c++',
						 include_dirs=[source_path,
									   get_numpy_include_dirs()],
						 library_dirs=[source_path],
						 extra_compile_args=["-fpermissive"],
						 extra_link_args=["-fpermissive"])

	return config 
Example 13
Project: lap   Author: gatagat   File: setup.py    BSD 2-Clause "Simplified" License 6 votes vote down vote up
def configuration(parent_package='', top_path=None):
    from numpy.distutils.misc_util import Configuration, get_numpy_include_dirs

    config = Configuration(None, parent_package, top_path)

    config.set_options(
        ignore_setup_xxx_py=True,
        assume_default_configuration=True,
        delegate_options_to_subpackages=True,
        quiet=True)

    config.add_data_dir('lap/tests')

    wrapper_pyx_file = get_wrapper_pyx()
    wrapper_c_file = os.path.splitext(wrapper_pyx_file)[0] + '.cpp'
    c_files = [
            os.path.join(os.path.dirname(wrapper_pyx_file), 'lapjv.cpp'),
            os.path.join(os.path.dirname(wrapper_pyx_file), 'lapmod.cpp')]
    config.add_extension('lap._lapjv', sources=[wrapper_c_file, c_files],
                         include_dirs=[get_numpy_include_dirs(), 'lap'])

    return config 
Example 14
Project: discretize   Author: simpeg   File: setup.py    MIT License 6 votes vote down vote up
def configuration(parent_package='', top_path=None):
    from numpy.distutils.misc_util import Configuration, get_numpy_include_dirs
    config = Configuration('utils', parent_package, top_path)

    ext = 'interputils_cython'
    try:
        from Cython.Build import cythonize
        cythonize(os.path.join(base_path, ext+'.pyx'))
    except ImportError:
        pass

    config.add_extension(
        ext,
        sources=[ext+'.c'],
        include_dirs=[get_numpy_include_dirs()]
    )

    return config 
Example 15
Project: discretize   Author: simpeg   File: setup.py    MIT License 6 votes vote down vote up
def configuration(parent_package='', top_path=None):
    from numpy.distutils.misc_util import Configuration, get_numpy_include_dirs
    config = Configuration('discretize', parent_package, top_path)

    ext = 'tree_ext'
    try:
        from Cython.Build import cythonize
        cythonize(os.path.join(base_path, ext+'.pyx'))
    except ImportError:
        pass

    config.add_extension(
        ext,
        sources=[ext+'.cpp', 'tree.cpp'],
        include_dirs=[get_numpy_include_dirs()]
    )

    config.add_subpackage('utils')
    config.add_subpackage('mixins')
    config.add_subpackage('base')

    return config 
Example 16
Project: Splunking-Crime   Author: nccgroup   File: setup.py    GNU Affero General Public License v3.0 6 votes vote down vote up
def configuration(parent_package='', top_path=None):
    from numpy.distutils.system_info import get_info
    from numpy.distutils.misc_util import Configuration, get_numpy_include_dirs
    config = Configuration('cluster', parent_package, top_path)

    blas_opt = get_info('lapack_opt')

    config.add_data_dir('tests')

    config.add_extension('_vq',
        sources=[('_vq.c')],
        include_dirs=[get_numpy_include_dirs()],
        extra_info=blas_opt)

    config.add_extension('_hierarchy',
        sources=[('_hierarchy.c')],
        include_dirs=[get_numpy_include_dirs()])

    return config 
Example 17
Project: senior-design   Author: james-tate   File: setup.py    GNU General Public License v2.0 6 votes vote down vote up
def configuration(parent_package = '', top_path = None):
    from numpy.distutils.misc_util import Configuration, get_numpy_include_dirs
    config = Configuration('cluster', parent_package, top_path)

    config.add_data_dir('tests')

    config.add_extension('_vq',
        sources=[join('src', 'vq_module.c'), join('src', 'vq.c')],
        include_dirs = [get_numpy_include_dirs()],
        define_macros=DEFINE_MACROS)

    config.add_extension('_hierarchy_wrap',
        sources=[join('src', 'hierarchy_wrap.c'), join('src', 'hierarchy.c')],
        include_dirs = [get_numpy_include_dirs()],
        define_macros=DEFINE_MACROS)

    return config 
Example 18
Project: att   Author: Centre-Alt-Rendiment-Esportiu   File: setup.py    GNU General Public License v3.0 5 votes vote down vote up
def configuration(parent_package='', top_path=None):
    from numpy.distutils.misc_util import Configuration, get_numpy_include_dirs
    from numpy.distutils.system_info import get_info
    from distutils.sysconfig import get_python_inc

    config = Configuration('spatial', parent_package, top_path)

    config.add_data_dir('tests')
    config.add_data_dir('benchmarks')

    qhull_src = ['geom2.c', 'geom.c', 'global.c', 'io.c', 'libqhull.c',
                 'mem.c', 'merge.c', 'poly2.c', 'poly.c', 'qset.c',
                 'random.c', 'rboxlib.c', 'stat.c', 'user.c', 'usermem.c',
                 'userprintf.c', 'userprintf_rbox.c']
    qhull_src = [join('qhull', 'src', x) for x in qhull_src]

    inc_dirs = [get_python_inc()]
    if inc_dirs[0] != get_python_inc(plat_specific=1):
        inc_dirs.append(get_python_inc(plat_specific=1))
    inc_dirs.append(get_numpy_include_dirs())

    cfg = dict(get_info('lapack_opt'))
    cfg.setdefault('include_dirs', []).extend(inc_dirs)
    cfg.setdefault('define_macros', []).append(('qh_QHpointer','1'))
    config.add_extension('qhull',
                         sources=['qhull.c'] + qhull_src,
                         **cfg)

    config.add_extension('ckdtree', sources=['ckdtree.c'])  # FIXME: cython

    config.add_extension('_distance_wrap',
        sources=[join('src', 'distance_wrap.c')],
        include_dirs=[get_numpy_include_dirs()])

    return config 
Example 19
Project: SuRVoS2   Author: DiamondLightSource   File: setup.py    MIT License 5 votes vote down vote up
def configuration(parent_package='', top_path=None):
    config = Configuration('superregions', parent_package, top_path,
                           cmdclass={'build_ext': build_ext})

    config.add_extension('_rag', sources='_rag.pyx',
                         include_dirs=[get_numpy_include_dirs()])

    config.add_extension('_ccl', sources='_ccl.pyx',
                         include_dirs=[get_numpy_include_dirs()])

    return config 
Example 20
Project: Computable   Author: ktraunmueller   File: setup.py    MIT License 5 votes vote down vote up
def configuration(parent_package='', top_path=None):
    from numpy.distutils.misc_util import Configuration, get_numpy_include_dirs
    from numpy.distutils.system_info import get_info
    from distutils.sysconfig import get_python_inc

    config = Configuration('spatial', parent_package, top_path)

    config.add_data_dir('tests')
    config.add_data_dir('benchmarks')

    qhull_src = ['geom2.c', 'geom.c', 'global.c', 'io.c', 'libqhull.c',
                 'mem.c', 'merge.c', 'poly2.c', 'poly.c', 'qset.c',
                 'random.c', 'rboxlib.c', 'stat.c', 'user.c', 'usermem.c',
                 'userprintf.c', 'userprintf_rbox.c']
    qhull_src = [join('qhull', 'src', x) for x in qhull_src]

    inc_dirs = [get_python_inc()]
    if inc_dirs[0] != get_python_inc(plat_specific=1):
        inc_dirs.append(get_python_inc(plat_specific=1))
    inc_dirs.append(get_numpy_include_dirs())

    cfg = dict(get_info('lapack_opt'))
    cfg.setdefault('include_dirs', []).extend(inc_dirs)
    cfg.setdefault('define_macros', []).append(('qh_QHpointer','1'))
    config.add_extension('qhull',
                         sources=['qhull.c'] + qhull_src,
                         **cfg)

    config.add_extension('ckdtree', sources=['ckdtree.c'])  # FIXME: cython

    config.add_extension('_distance_wrap',
        sources=[join('src', 'distance_wrap.c'), join('src', 'distance.c')],
        include_dirs=[get_numpy_include_dirs()])

    return config 
Example 21
Project: RPGOne   Author: RTHMaK   File: setup.py    Apache License 2.0 5 votes vote down vote up
def configuration(parent_package='', top_path=None):
    from numpy.distutils.misc_util import Configuration, get_numpy_include_dirs

    config = Configuration('feature', parent_package, top_path)
    config.add_data_dir('tests')

    cython(['corner_cy.pyx'], working_path=base_path)
    cython(['censure_cy.pyx'], working_path=base_path)
    cython(['orb_cy.pyx'], working_path=base_path)
    cython(['brief_cy.pyx'], working_path=base_path)
    cython(['_texture.pyx'], working_path=base_path)
    cython(['_hessian_det_appx.pyx'], working_path=base_path)
    cython(['_hoghistogram.pyx'], working_path=base_path)

    config.add_extension('corner_cy', sources=['corner_cy.c'],
                         include_dirs=[get_numpy_include_dirs()])
    config.add_extension('censure_cy', sources=['censure_cy.c'],
                         include_dirs=[get_numpy_include_dirs()])
    config.add_extension('orb_cy', sources=['orb_cy.c'],
                         include_dirs=[get_numpy_include_dirs()])
    config.add_extension('brief_cy', sources=['brief_cy.c'],
                         include_dirs=[get_numpy_include_dirs()])
    config.add_extension('_texture', sources=['_texture.c'],
                         include_dirs=[get_numpy_include_dirs(), '../_shared'])
    config.add_extension('_hessian_det_appx', sources=['_hessian_det_appx.c'],
                         include_dirs=[get_numpy_include_dirs()])
    config.add_extension('_hoghistogram', sources=['_hoghistogram.c'],
                         include_dirs=[get_numpy_include_dirs(), '../_shared'])

    return config 
Example 22
Project: senior-design   Author: james-tate   File: scons.py    GNU General Public License v2.0 5 votes vote down vote up
def get_numpy_include_dirs(sconscript_path):
    """Return include dirs for numpy.

    The paths are relatively to the setup.py script path."""
    from numscons import get_scons_build_dir
    scdir = pjoin(get_scons_build_dir(), pdirname(sconscript_path))
    n = scdir.count(os.sep)

    dirs = _incdir()
    rdirs = []
    for d in dirs:
        rdirs.append(pjoin(os.sep.join([os.pardir for i in range(n+1)]), d))
    return rdirs 
Example 23
Project: senior-design   Author: james-tate   File: setupscons.py    GNU General Public License v2.0 5 votes vote down vote up
def configuration(parent_package = '', top_path = None):
    from numpy.distutils.misc_util import Configuration, get_numpy_include_dirs
    config = Configuration('cluster', parent_package, top_path)

    config.add_data_dir('tests')

    #config.add_extension('_vq',
    #    sources=[join('src', 'vq_module.c'), join('src', 'vq.c')],
    #    include_dirs = [get_numpy_include_dirs()])
    config.add_sconscript('SConstruct')

    return config