當前位置: 首頁>>代碼示例>>Python>>正文


Python misc_util.Configuration方法代碼示例

本文整理匯總了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 
開發者ID:pulse2percept,項目名稱:pulse2percept,代碼行數:20,代碼來源:setup.py

示例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 
開發者ID:pulse2percept,項目名稱:pulse2percept,代碼行數:27,代碼來源:setup.py

示例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 
開發者ID:pulse2percept,項目名稱:pulse2percept,代碼行數:20,代碼來源:setup.py

示例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 
開發者ID:tgsmith61591,項目名稱:skutil,代碼行數:21,代碼來源:setup.py

示例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 
開發者ID:tgsmith61591,項目名稱:skutil,代碼行數:18,代碼來源:setup.py

示例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 
開發者ID:ryfeus,項目名稱:lambda-packs,代碼行數:23,代碼來源:setup.py

示例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 
開發者ID:ryfeus,項目名稱:lambda-packs,代碼行數:25,代碼來源:setup.py

示例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 
開發者ID:ryfeus,項目名稱:lambda-packs,代碼行數:21,代碼來源:setup.py

示例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 
開發者ID:ryfeus,項目名稱:lambda-packs,代碼行數:26,代碼來源:setup.py

示例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 
開發者ID:python-control,項目名稱:python-control,代碼行數:7,代碼來源:setup.py

示例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 
開發者ID:pulse2percept,項目名稱:pulse2percept,代碼行數:43,代碼來源:setup.py

示例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 
開發者ID:Frank-qlu,項目名稱:recruit,代碼行數:14,代碼來源:setup.py

示例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 
開發者ID:Frank-qlu,項目名稱:recruit,代碼行數:8,代碼來源:setup.py

示例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 
開發者ID:Frank-qlu,項目名稱:recruit,代碼行數:12,代碼來源:setup.py

示例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 
開發者ID:Frank-qlu,項目名稱:recruit,代碼行數:7,代碼來源:setup.py


注:本文中的numpy.distutils.misc_util.Configuration方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。