本文整理汇总了Python中numpy.distutils.misc_util.get_numpy_include_dirs方法的典型用法代码示例。如果您正苦于以下问题:Python misc_util.get_numpy_include_dirs方法的具体用法?Python misc_util.get_numpy_include_dirs怎么用?Python misc_util.get_numpy_include_dirs使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类numpy.distutils.misc_util
的用法示例。
在下文中一共展示了misc_util.get_numpy_include_dirs方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: configuration
# 需要导入模块: from numpy.distutils import misc_util [as 别名]
# 或者: from numpy.distutils.misc_util import get_numpy_include_dirs [as 别名]
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
示例2: configuration
# 需要导入模块: from numpy.distutils import misc_util [as 别名]
# 或者: from numpy.distutils.misc_util import get_numpy_include_dirs [as 别名]
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
示例3: configuration
# 需要导入模块: from numpy.distutils import misc_util [as 别名]
# 或者: from numpy.distutils.misc_util import get_numpy_include_dirs [as 别名]
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
示例4: configuration
# 需要导入模块: from numpy.distutils import misc_util [as 别名]
# 或者: from numpy.distutils.misc_util import get_numpy_include_dirs [as 别名]
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
示例5: configuration
# 需要导入模块: from numpy.distutils import misc_util [as 别名]
# 或者: from numpy.distutils.misc_util import get_numpy_include_dirs [as 别名]
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
示例6: configuration
# 需要导入模块: from numpy.distutils import misc_util [as 别名]
# 或者: from numpy.distutils.misc_util import get_numpy_include_dirs [as 别名]
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
示例7: configuration
# 需要导入模块: from numpy.distutils import misc_util [as 别名]
# 或者: from numpy.distutils.misc_util import get_numpy_include_dirs [as 别名]
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
示例8: configuration
# 需要导入模块: from numpy.distutils import misc_util [as 别名]
# 或者: from numpy.distutils.misc_util import get_numpy_include_dirs [as 别名]
def configuration(parent_package='', top_path=None):
from numpy.distutils.misc_util import Configuration, get_numpy_include_dirs
config = Configuration()
cython(['snrm2_.pyx'], working_path=base_path)
config.add_extension('snrm2_', sources=['snrm2_.c'],
include_dirs=[get_numpy_include_dirs()],
libraries=['blas'],
)
return config