本文整理汇总了Python中numpy.distutils.misc_util.Configuration方法的典型用法代码示例。如果您正苦于以下问题:Python misc_util.Configuration方法的具体用法?Python misc_util.Configuration怎么用?Python misc_util.Configuration使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类numpy.distutils.misc_util
的用法示例。
在下文中一共展示了misc_util.Configuration方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: configuration
# 需要导入模块: from numpy.distutils import misc_util [as 别名]
# 或者: from numpy.distutils.misc_util import Configuration [as 别名]
def configuration(parent_package='', top_path=None):
import numpy
from numpy.distutils.misc_util import Configuration
config = Configuration('stimuli', parent_package, top_path)
libraries = []
if os.name == 'posix':
libraries.append('m')
if platform.python_implementation() != 'PyPy':
config.add_extension('_base',
sources=['_base.pyx'],
include_dirs=[numpy.get_include()],
libraries=libraries)
config.add_subpackage('tests')
config.add_data_dir('data')
return config
示例2: configuration
# 需要导入模块: from numpy.distutils import misc_util [as 别名]
# 或者: from numpy.distutils.misc_util import Configuration [as 别名]
def configuration(parent_package='', top_path=None):
import numpy
from numpy.distutils.misc_util import Configuration
config = Configuration('models', parent_package, top_path)
libraries = []
if os.name == 'posix':
libraries.append('m')
if platform.python_implementation() != 'PyPy':
config.add_extension('_beyeler2019',
sources=['_beyeler2019.pyx'],
include_dirs=[numpy.get_include()],
libraries=libraries)
config.add_extension('_horsager2009',
sources=['_horsager2009.pyx'],
include_dirs=[numpy.get_include()],
libraries=libraries)
config.add_extension('_nanduri2012',
sources=['_nanduri2012.pyx'],
include_dirs=[numpy.get_include()],
libraries=libraries)
config.add_subpackage("tests")
return config
示例3: configuration
# 需要导入模块: from numpy.distutils import misc_util [as 别名]
# 或者: from numpy.distutils.misc_util import Configuration [as 别名]
def configuration(parent_package='', top_path=None):
if os.path.exists('MANIFEST'):
os.remove('MANIFEST')
from numpy.distutils.misc_util import Configuration
config = Configuration(None, parent_package, top_path)
# Avoid non-useful msg:
# "Ignoring attempt to set 'name' (from ... "
config.set_options(ignore_setup_xxx_py=True,
assume_default_configuration=True,
delegate_options_to_subpackages=True,
quiet=True)
config.add_subpackage('pulse2percept')
return config
示例4: configuration
# 需要导入模块: from numpy.distutils import misc_util [as 别名]
# 或者: from numpy.distutils.misc_util import Configuration [as 别名]
def configuration(parent_package="", top_path=None):
config = Configuration("metrics", parent_package, top_path)
cblas_libs, blas_info = get_blas_info()
if os.name == 'posix':
cblas_libs.append('m')
config.add_extension("_kernel_fast",
sources=["_kernel_fast.c"],
include_dirs=[os.path.join('..', 'src', 'cblas'),
numpy.get_include(),
blas_info.pop('include_dirs', [])],
libraries=cblas_libs,
extra_compile_args=blas_info.pop('extra_compile_args',
[]),
**blas_info)
config.add_subpackage('tests')
return config
示例5: configuration
# 需要导入模块: from numpy.distutils import misc_util [as 别名]
# 或者: from numpy.distutils.misc_util import Configuration [as 别名]
def configuration(parent_package='', top_path=None):
from numpy.distutils.misc_util import Configuration
config = Configuration(None, parent_package, top_path)
# Avoid non-useful msg
# "Ignoring attempt to set 'name' (from ... "
config.set_options(ignore_setup_xxx_py=True,
assume_default_configuration=True,
delegate_options_to_subpackages=True,
quiet=True)
config.add_subpackage(DISTNAME)
return config
# the default dict for a non-up-to-date package
示例6: configuration
# 需要导入模块: from numpy.distutils import misc_util [as 别名]
# 或者: from numpy.distutils.misc_util import Configuration [as 别名]
def configuration(parent_package='',top_path=None):
from numpy.distutils.misc_util import Configuration
config = Configuration('numpy', parent_package, top_path)
config.add_subpackage('compat')
config.add_subpackage('core')
config.add_subpackage('distutils')
config.add_subpackage('doc')
config.add_subpackage('f2py')
config.add_subpackage('fft')
config.add_subpackage('lib')
config.add_subpackage('linalg')
config.add_subpackage('ma')
config.add_subpackage('matrixlib')
config.add_subpackage('polynomial')
config.add_subpackage('random')
config.add_subpackage('testing')
config.add_data_dir('doc')
config.add_data_dir('tests')
config.make_config_py() # installs __config__.py
return config
示例7: configuration
# 需要导入模块: from numpy.distutils import misc_util [as 别名]
# 或者: from numpy.distutils.misc_util import Configuration [as 别名]
def configuration(parent_package='', top_path=None):
from numpy.distutils.misc_util import Configuration
config = Configuration('signal', parent_package, top_path)
config.add_data_dir('tests')
config.add_extension('sigtools',
sources=['sigtoolsmodule.c', 'firfilter.c',
'medianfilter.c', 'lfilter.c.src',
'correlate_nd.c.src'],
depends=['sigtools.h'],
include_dirs=['.'],
**numpy_nodepr_api)
config.add_extension('_spectral', sources=['_spectral.c'])
config.add_extension('_max_len_seq_inner', sources=['_max_len_seq_inner.c'])
config.add_extension('_upfirdn_apply', sources=['_upfirdn_apply.c'])
spline_src = ['splinemodule.c', 'S_bspline_util.c', 'D_bspline_util.c',
'C_bspline_util.c', 'Z_bspline_util.c', 'bspline_util.c']
config.add_extension('spline', sources=spline_src, **numpy_nodepr_api)
return config
示例8: configuration
# 需要导入模块: from numpy.distutils import misc_util [as 别名]
# 或者: from numpy.distutils.misc_util import Configuration [as 别名]
def configuration(parent_package='', top_path=None):
from numpy import get_include
from numpy.distutils.system_info import get_info, NotFoundError
from numpy.distutils.misc_util import Configuration
lapack_opt = get_info('lapack_opt')
if not lapack_opt:
raise NotFoundError('no lapack/blas resources found')
config = Configuration('_trlib', parent_package, top_path)
config.add_extension('_trlib',
sources=['_trlib.c', 'trlib_krylov.c',
'trlib_eigen_inverse.c', 'trlib_leftmost.c',
'trlib_quadratic_zero.c', 'trlib_tri_factor.c'],
include_dirs=[get_include(), 'trlib'],
extra_info=lapack_opt,
)
return config
示例9: configuration
# 需要导入模块: from numpy.distutils import misc_util [as 别名]
# 或者: from numpy.distutils.misc_util import Configuration [as 别名]
def configuration(parent_package='',top_path=None):
from numpy.distutils.misc_util import Configuration
config = Configuration('scipy',parent_package,top_path)
config.add_subpackage('cluster')
config.add_subpackage('constants')
config.add_subpackage('fftpack')
config.add_subpackage('integrate')
config.add_subpackage('interpolate')
config.add_subpackage('io')
config.add_subpackage('linalg')
config.add_data_files('*.pxd')
config.add_subpackage('misc')
config.add_subpackage('odr')
config.add_subpackage('optimize')
config.add_subpackage('signal')
config.add_subpackage('sparse')
config.add_subpackage('spatial')
config.add_subpackage('special')
config.add_subpackage('stats')
config.add_subpackage('ndimage')
config.add_subpackage('_build_utils')
config.add_subpackage('_lib')
config.make_config_py()
return config
示例10: configuration
# 需要导入模块: from numpy.distutils import misc_util [as 别名]
# 或者: from numpy.distutils.misc_util import Configuration [as 别名]
def configuration(parent_package='', top_path=None):
from numpy.distutils.misc_util import Configuration
config = Configuration('control', parent_package, top_path)
config.add_subpackage('tests')
return config
示例11: configuration
# 需要导入模块: from numpy.distutils import misc_util [as 别名]
# 或者: from numpy.distutils.misc_util import Configuration [as 别名]
def configuration(parent_package='', top_path=None):
from numpy.distutils.misc_util import Configuration
from numpy.distutils.system_info import get_info
import numpy
libraries = []
if os.name == 'posix':
libraries.append('m')
config = Configuration('pulse2percept', parent_package, top_path)
# submodules which do not have their own setup.py
# we must manually add sub-submodules & tests
config.add_subpackage('implants')
config.add_subpackage('implants/tests')
config.add_subpackage('utils')
config.add_subpackage('utils/tests')
config.add_subpackage('percepts')
config.add_subpackage('percepts/tests')
config.add_subpackage('viz')
config.add_subpackage('viz/tests')
config.add_subpackage('datasets')
config.add_subpackage('datasets/tests')
# Submodules which have their own setup.py; e.g., because they use Cython:
config.add_subpackage('models')
config.add_subpackage('stimuli')
# Data directories
config.add_data_dir('datasets/data')
config.add_data_dir('stimuli/data')
# https://cython.readthedocs.io/en/latest/src/userguide/source_files_and_compilation.html#compiler-directives
config.ext_modules = cythonize(config.ext_modules,
compiler_directives={
'language_level': 3, # use Py3 runtime
'boundscheck': False, # no IndexError
'wraparound': False, # no arr[-1]
'initializedcheck': False, # no None
})
return config
示例12: configuration
# 需要导入模块: from numpy.distutils import misc_util [as 别名]
# 或者: from numpy.distutils.misc_util import Configuration [as 别名]
def configuration(parent_package='',top_path=None):
from numpy.distutils.misc_util import Configuration
config = Configuration('fft', parent_package, top_path)
config.add_data_dir('tests')
# Configure fftpack_lite
config.add_extension('fftpack_lite',
sources=['fftpack_litemodule.c', 'fftpack.c']
)
return config
示例13: configuration
# 需要导入模块: from numpy.distutils import misc_util [as 别名]
# 或者: from numpy.distutils.misc_util import Configuration [as 别名]
def configuration(parent_package='',top_path=None):
from numpy.distutils.misc_util import Configuration
config = Configuration('compat', parent_package, top_path)
config.add_data_dir('tests')
return config
示例14: configuration
# 需要导入模块: from numpy.distutils import misc_util [as 别名]
# 或者: from numpy.distutils.misc_util import Configuration [as 别名]
def configuration(parent_package='',top_path=None):
from numpy.distutils.misc_util import Configuration
config = Configuration('distutils', parent_package, top_path)
config.add_subpackage('command')
config.add_subpackage('fcompiler')
config.add_data_dir('tests')
config.add_data_files('site.cfg')
config.add_data_files('mingw/gfortran_vs2003_hack.c')
config.make_config_py()
return config
示例15: configuration
# 需要导入模块: from numpy.distutils import misc_util [as 别名]
# 或者: from numpy.distutils.misc_util import Configuration [as 别名]
def configuration(parent_package='', top_path=None):
from numpy.distutils.misc_util import Configuration
config = Configuration('matrixlib', parent_package, top_path)
config.add_data_dir('tests')
return config