当前位置: 首页>>代码示例>>Python>>正文


Python system_info.get_info方法代码示例

本文整理汇总了Python中numpy.distutils.system_info.get_info方法的典型用法代码示例。如果您正苦于以下问题:Python system_info.get_info方法的具体用法?Python system_info.get_info怎么用?Python system_info.get_info使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在numpy.distutils.system_info的用法示例。


在下文中一共展示了system_info.get_info方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: get_blas_info

# 需要导入模块: from numpy.distutils import system_info [as 别名]
# 或者: from numpy.distutils.system_info import get_info [as 别名]
def get_blas_info():
    def atlas_not_found(blas_info_):
        def_macros = blas_info.get('define_macros', [])
        for x in def_macros:
            if x[0] == "NO_ATLAS_INFO":
                # if x[1] != 1 we should have lapack
                # how do we do that now?
                return True
            if x[0] == "ATLAS_INFO":
                if "None" in x[1]:
                    # this one turned up on FreeBSD
                    return True
        return False

    blas_info = get_info('blas_opt', 0)
    if (not blas_info) or atlas_not_found(blas_info):
        cblas_libs = ['cblas']
        blas_info.pop('libraries', None)
    else:
        cblas_libs = blas_info.pop('libraries', [])

    return cblas_libs, blas_info 
开发者ID:tgsmith61591,项目名称:skutil,代码行数:24,代码来源:__init__.py

示例2: configuration

# 需要导入模块: from numpy.distutils import system_info [as 别名]
# 或者: from numpy.distutils.system_info import get_info [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 
开发者ID:ryfeus,项目名称:lambda-packs,代码行数:25,代码来源:setup.py

示例3: configuration

# 需要导入模块: from numpy.distutils import system_info [as 别名]
# 或者: from numpy.distutils.system_info import get_info [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 
开发者ID:nccgroup,项目名称:Splunking-Crime,代码行数:21,代码来源:setup.py

示例4: configuration

# 需要导入模块: from numpy.distutils import system_info [as 别名]
# 或者: from numpy.distutils.system_info import get_info [as 别名]
def configuration(parent_package='', top_path=None):
    from numpy.distutils.misc_util import Configuration

    '''
    from distutils.sysconfig import get_python_inc
    from numpy.distutils.system_info import get_info, NotFoundError, numpy_info
    from numpy.distutils.misc_util import get_numpy_include_dirs
    from scipy._build_utils import (get_sgemv_fix, get_g77_abi_wrappers, split_fortran_files)

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

    lapack_opt = get_info('lapack_opt')

    if not lapack_opt:
        raise NotFoundError('no lapack/blas resources found')

    atlas_version = ([v[3:-3] for k, v in lapack_opt.get('define_macros', [])
        if k == 'ATLAS_INFO']+[None])[0]
    if atlas_version:
        print(('ATLAS version: %s' % atlas_version))

    sources = ['dqrsl.pyf.src']
    sources += get_g77_abi_wrappers(lapack_opt)
    sources += get_sgemv_fix(lapack_opt)

    # add the fortran module
    config.add_extension('dqrsl',
                         sources=sources,
                         depends=[],
                         extra_info=lapack_opt
                         )

    return config
    '''

    config = Configuration('odr', parent_package, top_path)
    config.add_extension('dqrsl',
                         sources=['dqrsl.f'])

    return config 
开发者ID:tgsmith61591,项目名称:skutil,代码行数:42,代码来源:setup.py

示例5: configuration

# 需要导入模块: from numpy.distutils import system_info [as 别名]
# 或者: from numpy.distutils.system_info import get_info [as 别名]
def configuration(parent_package='',top_path=None):
    from numpy.distutils.system_info import get_info, NotFoundError
    from numpy.distutils.misc_util import Configuration
    from scipy._build_utils import get_g77_abi_wrappers

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

    lapack_opt = get_info('lapack_opt')

    if not lapack_opt:
        raise NotFoundError('no lapack/blas resources found')

    # iterative methods
    methods = ['BiCGREVCOM.f.src',
               'BiCGSTABREVCOM.f.src',
               'CGREVCOM.f.src',
               'CGSREVCOM.f.src',
#               'ChebyREVCOM.f.src',
               'GMRESREVCOM.f.src',
#               'JacobiREVCOM.f.src',
               'QMRREVCOM.f.src',
#               'SORREVCOM.f.src'
               ]

    Util = ['STOPTEST2.f.src','getbreak.f.src']
    sources = Util + methods + ['_iterative.pyf.src']
    sources = [join('iterative', x) for x in sources]
    sources += get_g77_abi_wrappers(lapack_opt)

    config.add_extension('_iterative',
                         sources=sources,
                         extra_info=lapack_opt)

    config.add_data_dir('tests')

    return config 
开发者ID:ryfeus,项目名称:lambda-packs,代码行数:38,代码来源:setup.py

示例6: configuration

# 需要导入模块: from numpy.distutils import system_info [as 别名]
# 或者: from numpy.distutils.system_info import get_info [as 别名]
def configuration(parent_package='',top_path=None):
    from numpy.distutils.system_info import get_info, NotFoundError
    from numpy.distutils.misc_util import Configuration
    from scipy._build_utils import get_g77_abi_wrappers, get_sgemv_fix

    lapack_opt = get_info('lapack_opt')

    if not lapack_opt:
        raise NotFoundError('no lapack/blas resources found')

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

    arpack_sources = [join('ARPACK','SRC', '*.f')]
    arpack_sources.extend([join('ARPACK','UTIL', '*.f')])

    arpack_sources += get_g77_abi_wrappers(lapack_opt)

    config.add_library('arpack_scipy', sources=arpack_sources,
                       include_dirs=[join('ARPACK', 'SRC')])

    ext_sources = ['arpack.pyf.src']
    ext_sources += get_sgemv_fix(lapack_opt)
    config.add_extension('_arpack',
                         sources=ext_sources,
                         libraries=['arpack_scipy'],
                         extra_info=lapack_opt,
                         depends=arpack_sources,
                         )

    config.add_data_dir('tests')

    # Add license files
    config.add_data_files('ARPACK/COPYING')

    return config 
开发者ID:ryfeus,项目名称:lambda-packs,代码行数:37,代码来源:setup.py

示例7: configuration

# 需要导入模块: from numpy.distutils import system_info [as 别名]
# 或者: from numpy.distutils.system_info import get_info [as 别名]
def configuration(parent_package='', top_path=None):
    import warnings
    from numpy.distutils.misc_util import Configuration
    from numpy.distutils.system_info import get_info, BlasNotFoundError
    config = Configuration('odr', parent_package, top_path)

    libodr_files = ['d_odr.f',
                    'd_mprec.f',
                    'dlunoc.f']

    blas_info = get_info('blas_opt')
    if blas_info:
        libodr_files.append('d_lpk.f')
    else:
        warnings.warn(BlasNotFoundError.__doc__)
        libodr_files.append('d_lpkbls.f')

    odrpack_src = [join('odrpack', x) for x in libodr_files]
    config.add_library('odrpack', sources=odrpack_src)

    sources = ['__odrpack.c']
    libraries = ['odrpack'] + blas_info.pop('libraries', [])
    include_dirs = ['.'] + blas_info.pop('include_dirs', [])
    config.add_extension('__odrpack',
        sources=sources,
        libraries=libraries,
        include_dirs=include_dirs,
        depends=(['odrpack.h'] + odrpack_src),
        **blas_info
    )

    config.add_data_dir('tests')
    return config 
开发者ID:ryfeus,项目名称:lambda-packs,代码行数:35,代码来源:setup.py

示例8: configuration

# 需要导入模块: from numpy.distutils import system_info [as 别名]
# 或者: from numpy.distutils.system_info import get_info [as 别名]
def configuration(parent_package='',top_path=None):
    import numpy
    from numpy.distutils.misc_util import Configuration
    from numpy.distutils.system_info import get_info, dict_append

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

    umf_info = get_info('umfpack', notfound_action=1)

    umfpack_i_file = config.paths('umfpack.i')[0]

    def umfpack_i(ext, build_dir):
        if umf_info:
            return umfpack_i_file

    blas_info = get_info('blas_opt')
    build_info = {}
    dict_append(build_info, **umf_info)
    dict_append(build_info, **blas_info)

    config.add_extension('__umfpack',
                          sources=[umfpack_i],
                          depends=['umfpack.i'],
                          **build_info)

    return config 
开发者ID:ktraunmueller,项目名称:Computable,代码行数:29,代码来源:setup.py

示例9: configuration

# 需要导入模块: from numpy.distutils import system_info [as 别名]
# 或者: from numpy.distutils.system_info import get_info [as 别名]
def configuration(parent_package='',top_path=None):
    from numpy.distutils.misc_util import Configuration
    from numpy.distutils.system_info import get_info

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

    lapack_opt = get_info('lapack_opt',notfound_action=2)
    if sys.platform == 'win32':
        superlu_defs = [('NO_TIMER',1)]
    else:
        superlu_defs = []
    superlu_defs.append(('USE_VENDOR_BLAS',1))

    superlu_src = join(dirname(__file__), 'SuperLU', 'SRC')

    sources = list(glob.glob(join(superlu_src, '*.c')))
    headers = list(glob.glob(join(superlu_src, '*.h')))
    if os.name == 'nt' and ('FPATH' in os.environ or 'MKLROOT' in os.environ):
        # when using MSVC + MKL, lsame is already in MKL
        sources.remove(join(superlu_src, 'lsame.c'))

    config.add_library('superlu_src',
                       sources=sources,
                       macros=superlu_defs,
                       include_dirs=[superlu_src],
                       )

    # Extension
    config.add_extension('_superlu',
                         sources=['_superlumodule.c',
                                    '_superlu_utils.c',
                                    '_superluobject.c'],
                         libraries=['superlu_src'],
                         depends=(sources + headers),
                         extra_info=lapack_opt,
                         )

    config.add_subpackage('umfpack')

    return config 
开发者ID:ktraunmueller,项目名称:Computable,代码行数:43,代码来源:setup.py

示例10: configuration

# 需要导入模块: from numpy.distutils import system_info [as 别名]
# 或者: from numpy.distutils.system_info import get_info [as 别名]
def configuration(parent_package='',top_path=None):
    from numpy.distutils.system_info import get_info, NotFoundError
    from numpy.distutils.misc_util import Configuration
    from scipy._build_utils import get_g77_abi_wrappers

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

    lapack_opt = get_info('lapack_opt')

    if not lapack_opt:
        raise NotFoundError('no lapack/blas resources found')

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

    arpack_sources = [join('ARPACK','SRC', '*.f')]
    arpack_sources.extend([join('ARPACK','UTIL', '*.f')])
    arpack_sources.extend([join('ARPACK','LAPACK', '*.f')])

    arpack_sources += get_g77_abi_wrappers(lapack_opt)

    config.add_library('arpack_scipy', sources=arpack_sources,
                       include_dirs=[join('ARPACK', 'SRC')])

    config.add_extension('_arpack',
                         sources='arpack.pyf.src',
                         libraries=['arpack_scipy'],
                         extra_info=lapack_opt,
                         depends=arpack_sources,
                         )

    config.add_data_dir('tests')
    return config 
开发者ID:ktraunmueller,项目名称:Computable,代码行数:34,代码来源:setup.py

示例11: configuration

# 需要导入模块: from numpy.distutils import system_info [as 别名]
# 或者: from numpy.distutils.system_info import get_info [as 别名]
def configuration(parent_package='',top_path=None):
    from numpy.distutils.system_info import get_info, NotFoundError
    from numpy.distutils.misc_util import Configuration
    from scipy._build_utils import get_g77_abi_wrappers

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

    lapack_opt = get_info('lapack_opt')

    if not lapack_opt:
        raise NotFoundError('no lapack/blas resources found')

    # iterative methods
    methods = ['BiCGREVCOM.f.src',
               'BiCGSTABREVCOM.f.src',
               'CGREVCOM.f.src',
               'CGSREVCOM.f.src',
#               'ChebyREVCOM.f.src',
               'GMRESREVCOM.f.src',
#               'JacobiREVCOM.f.src',
               'QMRREVCOM.f.src',
#               'SORREVCOM.f.src'
               ]

    Util = ['getbreak.f.src']
    sources = Util + methods + ['_iterative.pyf.src']
    sources = [join('iterative', x) for x in sources]
    sources += get_g77_abi_wrappers(lapack_opt)

    config.add_extension('_iterative',
                         sources=sources,
                         extra_info=lapack_opt)

    config.add_data_dir('tests')

    return config 
开发者ID:Relph1119,项目名称:GraphicDesignPatternByPython,代码行数:38,代码来源:setup.py

示例12: configuration

# 需要导入模块: from numpy.distutils import system_info [as 别名]
# 或者: from numpy.distutils.system_info import get_info [as 别名]
def configuration(parent_package='',top_path=None):
    from numpy.distutils.misc_util import Configuration
    from numpy.distutils.system_info import get_info, dict_append

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

    umf_info = get_info('umfpack', notfound_action=1)

    ## The following addition is needed when linking against a umfpack built
    ## from the latest SparseSuite. Not (strictly) needed when linking against
    ## the version in the ubuntu repositories.
    if not sys.platform in ('darwin', 'win32'):
        umf_info['libraries'].insert(0, 'rt')

    umfpack_i_file = config.paths('umfpack.i')[0]

    def umfpack_i(ext, build_dir):
        if umf_info:
            return umfpack_i_file

    blas_info = get_info('blas_opt')
    build_info = {}
    dict_append(build_info, **umf_info)
    dict_append(build_info, **blas_info)
    
    config.add_extension('__umfpack',
                         sources=[umfpack_i],
                         depends=['umfpack.i'],
                         **build_info)

    return config 
开发者ID:scikit-umfpack,项目名称:scikit-umfpack,代码行数:34,代码来源:setup.py

示例13: configuration

# 需要导入模块: from numpy.distutils import system_info [as 别名]
# 或者: from numpy.distutils.system_info import get_info [as 别名]
def configuration(parent_package='',top_path=None):
    from numpy.distutils.system_info import get_info, NotFoundError
    from numpy.distutils.misc_util import Configuration
    from scipy._build_utils import get_g77_abi_wrappers, get_sgemv_fix

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

    lapack_opt = get_info('lapack_opt')

    if not lapack_opt:
        raise NotFoundError('no lapack/blas resources found')

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

    arpack_sources = [join('ARPACK','SRC', '*.f')]
    arpack_sources.extend([join('ARPACK','UTIL', '*.f')])

    arpack_sources += get_g77_abi_wrappers(lapack_opt)

    config.add_library('arpack_scipy', sources=arpack_sources,
                       include_dirs=[join('ARPACK', 'SRC')])

    ext_sources = ['arpack.pyf.src']
    ext_sources += get_sgemv_fix(lapack_opt)
    config.add_extension('_arpack',
                         sources=ext_sources,
                         libraries=['arpack_scipy'],
                         extra_info=lapack_opt,
                         depends=arpack_sources,
                         )

    config.add_data_dir('tests')
    return config 
开发者ID:nccgroup,项目名称:Splunking-Crime,代码行数:35,代码来源:setup.py

示例14: checkimports

# 需要导入模块: from numpy.distutils import system_info [as 别名]
# 或者: from numpy.distutils.system_info import get_info [as 别名]
def checkimports(optiondict):
    from numpy.distutils.system_info import get_info
    optiondict['blas_opt'] = get_info('blas_opt')
    optiondict['lapack_opt'] = get_info('lapack_opt')

    if pyfftwexists:
        print('monkey patched scipy.fftpack to use pyfftw')
    else:
        print('using standard scipy.fftpack')
    optiondict['pyfftwexists'] = pyfftwexists

    if numbaexists:
        print('numba exists')
    else:
        print('numba does not exist')
    optiondict['numbaexists'] = numbaexists

    if memprofilerexists:
        print('memprofiler exists')
    else:
        print('memprofiler does not exist')
    optiondict['memprofilerexists'] = memprofilerexists

    if nibabelexists:
        print('nibabel exists')
    else:
        print('nibabel does not exist')
    optiondict['nibabelexists'] = nibabelexists

    if donotbeaggressive:
        print('no aggressive optimization')
    else:
        print('aggressive optimization')
    optiondict['donotbeaggressive'] = donotbeaggressive

    global donotusenumba
    if donotusenumba:
        print('will not use numba even if present')
    else:
        print('using numba if present')
    optiondict['donotusenumba'] = donotusenumba 
开发者ID:bbfrederick,项目名称:rapidtide,代码行数:43,代码来源:util.py

示例15: configuration

# 需要导入模块: from numpy.distutils import system_info [as 别名]
# 或者: from numpy.distutils.system_info import get_info [as 别名]
def configuration(parent_package='', top_path=None):
    from numpy.distutils.misc_util import Configuration
    from numpy.distutils.system_info import get_info
    config = Configuration('linalg', parent_package, top_path)

    config.add_data_dir('tests')

    # Configure lapack_lite

    src_dir = 'lapack_lite'
    lapack_lite_src = [
        os.path.join(src_dir, 'python_xerbla.c'),
        os.path.join(src_dir, 'f2c_z_lapack.c'),
        os.path.join(src_dir, 'f2c_c_lapack.c'),
        os.path.join(src_dir, 'f2c_d_lapack.c'),
        os.path.join(src_dir, 'f2c_s_lapack.c'),
        os.path.join(src_dir, 'f2c_lapack.c'),
        os.path.join(src_dir, 'f2c_blas.c'),
        os.path.join(src_dir, 'f2c_config.c'),
        os.path.join(src_dir, 'f2c.c'),
    ]
    all_sources = config.paths(lapack_lite_src)

    lapack_info = get_info('lapack_opt', 0)  # and {}

    def get_lapack_lite_sources(ext, build_dir):
        if not lapack_info:
            print("### Warning:  Using unoptimized lapack ###")
            return all_sources
        else:
            if sys.platform == 'win32':
                print("### Warning:  python_xerbla.c is disabled ###")
                return []
            return [all_sources[0]]

    config.add_extension(
        'lapack_lite',
        sources=['lapack_litemodule.c', get_lapack_lite_sources],
        depends=['lapack_lite/f2c.h'],
        extra_info=lapack_info,
    )

    # umath_linalg module
    config.add_extension(
        '_umath_linalg',
        sources=['umath_linalg.c.src', get_lapack_lite_sources],
        depends=['lapack_lite/f2c.h'],
        extra_info=lapack_info,
        libraries=['npymath'],
    )
    return config 
开发者ID:Frank-qlu,项目名称:recruit,代码行数:53,代码来源:setup.py


注:本文中的numpy.distutils.system_info.get_info方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。