• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Python misc_util.Configuration类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: configuration

def configuration(parent_package='',top_path=None):
    config = Configuration('f2py', parent_package, top_path)

    config.add_data_dir('tests')

    config.add_data_files('src/fortranobject.c',
                          'src/fortranobject.h',
                          )

    config.make_svn_version_py()

    def generate_f2py_py(build_dir):
        f2py_exe = 'f2py'+os.path.basename(sys.executable)[6:]
        if f2py_exe[-4:]=='.exe':
            f2py_exe = f2py_exe[:-4] + '.py'
        if 'bdist_wininst' in sys.argv and f2py_exe[-3:] != '.py':
            f2py_exe = f2py_exe + '.py'
        target = os.path.join(build_dir, f2py_exe)
        if newer(__file__, target):
            log.info('Creating %s', target)
            f = open(target, 'w')
            f.write('#!%s\n' % (sys.executable))
            mainloc = os.path.join(os.path.dirname(__file__), "__main__.py")
            with open(mainloc) as mf:
                f.write(mf.read())
            f.close()
        return target

    config.add_scripts(generate_f2py_py)

    log.info('F2PY Version %s', config.get_version())

    return config
开发者ID:Arasz,项目名称:numpy,代码行数:33,代码来源:setup.py


示例2: configuration

def configuration(parent_package='',top_path=None):
    from scipy._build_utils.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')

    # 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:BranYang,项目名称:scipy,代码行数:33,代码来源:setup.py


示例3: configuration

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_016', parent_package, top_path)
    
    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())

    ckdtree_src = ['ckdtree_query.cxx',
                   'ckdtree_globals.cxx',
                   'ckdtree_cpp_exc.cxx']
    ckdtree_src = [join('ckdtree', 'src', x) for x in ckdtree_src]
    
    ckdtree_headers = ['ckdtree_decl.h', 
                       'ckdtree_exc.h', 
                       'ckdtree_methods.h',
                       'ckdtree_utils.h']
    ckdtree_headers = [join('ckdtree', 'src', x) for x in ckdtree_headers]
    
    ckdtree_dep = ['ckdtree.cxx'] + ckdtree_headers + ckdtree_src
    config.add_extension('ckdtree',
                         sources=[join('ckdtree', 'ckdtree.cxx')] + ckdtree_src,
                         depends=ckdtree_dep,
                         include_dirs=inc_dirs + [join('ckdtree','src')])
    return config
开发者ID:sturlamolden,项目名称:cKDTree-bench,代码行数:29,代码来源:setup.py


示例4: configuration

def configuration(parent_package='', top_path=None):
    from numpy.distutils.misc_util import Configuration
    config = Configuration('',parent_package, top_path)
    config.add_extension('slicot', 
                         libraries=['lapack'],
                         sources=['src/slicot.pyf'] + glob('src/*.f'))
    return config
开发者ID:henjo,项目名称:slicot,代码行数:7,代码来源:setup.py


示例5: configuration

def configuration(parent_package='',top_path=None):
    from numpy.distutils.misc_util import Configuration
    config = Configuration('',parent_package,top_path)

    config.add_extension('fortran_routines',
                         sources = ['src/fortran/fortran_routines.f95'])
    return config
开发者ID:Tmacme,项目名称:hotnet2,代码行数:7,代码来源:setup_fortran.py


示例6: configuration

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:alfonsodiecko,项目名称:PYTHON_DIST,代码行数:27,代码来源:setup.py


示例7: configuration

def configuration(parent_package='',top_path=None):
    from numpy.distutils.misc_util import Configuration
    config = Configuration("wmap5Wrapper", parent_package, top_path,
                           namespace_packages = ['wmap5Wrapper'],
                           version='0.3.0',
                           author  = 'Joel Akeret',
                           author_email="[email protected]",
                           description = "perform the wmap likelihood computation",
                           url = "http://www.fhnw.ch",
                           long_description = desc)

    config.add_extension('_wmapWrapper',
                         sources=[
            				'likelihood_v3/read_archive_map.f90',
            				'likelihood_v3/read_fits.f90',
            				'likelihood_v3/healpix_types.f90',
                            'likelihood_v3/br_mod_dist.f90',
            				'likelihood_v3/WMAP_5yr_options.F90',
            				'likelihood_v3/WMAP_5yr_util.f90',
            				'likelihood_v3/WMAP_5yr_gibbs.F90',
            				'likelihood_v3/WMAP_5yr_tt_pixlike.F90',
            				'likelihood_v3/WMAP_5yr_tt_beam_ptsrc_chisq.f90',
                            'likelihood_v3/WMAP_5yr_teeebb_pixlike.F90',
            				'likelihood_v3/WMAP_5yr_likelihood.F90',
            				'source/WmapWrapperCore.f90',
            				'source/WmapWrapper.f90',
            				'_wmapWrapper.pyf'] ,
                            include_dirs = include_dirs,
                            library_dirs = library_dirs,
                            libraries = libraries,
                            extra_f90_compile_args=extra_f90_compile_args,
                            extra_link_args=extra_link_args
                            )

    return config
开发者ID:cosmo-ethz,项目名称:CosmoHammerPlugins,代码行数:35,代码来源:setup.py


示例8: configuration

def configuration(parent_package='', top_path=None):
    from numpy.distutils.misc_util import Configuration

    config = Configuration('gufunc_sampler', parent_package, top_path)
    config.add_extension('_gs_kernels', ['_gs_kernels.c.src'])

    return config
开发者ID:jaimefrio,项目名称:gufunc_sampler,代码行数:7,代码来源:setup.py


示例9: configuration

def configuration(parent_package='',top_path=None):
    from numpy.distutils.misc_util import Configuration
    config = Configuration('',parent_package,top_path)

    config.add_extension('m',
                         sources = ['m.pyf','foo.c'])
    return config
开发者ID:jhmapoorva,项目名称:SciPy-CookBook,代码行数:7,代码来源:f2py_and_NumPy.py


示例10: configuration

def configuration(parent_package="", top_path=None):
    import numpy
    from numpy.distutils.misc_util import Configuration

    config = Configuration("vista_directory", parent_package, top_path)
    config.add_extension("vista", ["vista.c"])
    return config
开发者ID:volcanozhang,项目名称:microstress,代码行数:7,代码来源:setup.py


示例11: configuration

def configuration(parent_package='', top_path=None):
    from numpy.distutils.misc_util import Configuration
    config = Configuration('units', parent_package, top_path)
    config.add_subpackage("tests")
    config.make_config_py()  # installs __config__.py
    #config.make_svn_version_py()
    return config
开发者ID:danielgrassinger,项目名称:yt_new_frontend,代码行数:7,代码来源:setup.py


示例12: configuration

def configuration(parent_package='',top_path=None):
    from numpy.distutils.misc_util import Configuration
    import os.path as op

    auto_name = op.split(op.dirname(__file__))[-1]
    config = Configuration(auto_name, parent_package, top_path)

    subdirs = [
        'applications',
        'base',
        'discrete',
        'mesh',
        'homogenization',
        'linalg',
        'mechanics',
        'parallel',
        'physics',
        'postprocess',
        'solvers',
        'terms'
    ]
    for subdir in subdirs:
        config.add_subpackage(subdir)

    return config
开发者ID:clazaro,项目名称:sfepy,代码行数:25,代码来源:setup.py


示例13: configuration

def configuration(parent_package='', top_path=None):
    global config
    from numpy.distutils.misc_util import Configuration
    from numpy.distutils.fcompiler import get_default_fcompiler, CompilerNotFound

    build = True
    try:
        # figure out which compiler we're going to use
        compiler = get_default_fcompiler()
        # set some fortran compiler-dependent flags
        f90flags = []
        if compiler == 'gnu95':
            f90flags.append('-fno-range-check')
            f90flags.append('-ffree-form')
            f90flags.append('-fPIC')
        elif compiler == 'intel' or compiler == 'intelem':
            f90flags.append('-132')
        #  Need zero-level optimization to avoid build problems with rrtmg_lw_k_g.f90
        #f90flags.append('-O2')
        #  Suppress all compiler warnings (avoid huge CI log files)
        f90flags.append('-w')
    except CompilerNotFound:
        print('No Fortran compiler found, not building the RRTMG_LW radiation module!')
        build = False

    config = Configuration(package_name='_rrtmg_lw', parent_name=parent_package, top_path=top_path)
    if build:
        config.add_extension(
            name='_rrtmg_lw',
            sources=[rrtmg_lw_gen_source],
            extra_f90_compile_args=f90flags,
            f2py_options=['--quiet'],
        )

    return config
开发者ID:brian-rose,项目名称:climlab,代码行数:35,代码来源:setup.py


示例14: configuration

def configuration(parent_package='', top_path=None):
    import os.path as op
    from numpy.distutils.misc_util import Configuration

    from sfepy import Config

    site_config = Config()
    system = site_config.system()
    os_flag = {'posix' : 0, 'windows' : 1}[system]

    auto_dir = op.dirname(__file__)
    auto_name = op.split(auto_dir)[-1]
    config = Configuration(auto_name, parent_package, top_path)

    inline = 'inline' if system == 'posix' else '__inline'
    defines = [('SFEPY_PLATFORM', os_flag),
               ('inline', inline)]
    if '-DDEBUG_FMF' in site_config.debug_flags():
        defines.append(('DEBUG_FMF', None))

    common_path = '../../common/extmods'

    common_src = ['fmfield.c', 'geommech.c', 'common_python.c']
    common_src = [op.join(common_path, ii) for ii in common_src]

    src = ['igac.pyx', 'nurbs.c']
    config.add_extension('igac',
                         sources=src + common_src,
                         depends=common_src,
                         extra_compile_args=site_config.compile_flags(),
                         extra_link_args=site_config.link_flags(),
                         include_dirs=[auto_dir, common_path],
                         define_macros=defines)

    return config
开发者ID:rc,项目名称:sfepy,代码行数:35,代码来源:setup.py


示例15: configuration

def configuration(parent_package='', top_path=None):
    from numpy.distutils.misc_util import Configuration

    cblas_libs, blas_info = get_blas_info()

    libraries = []
    if os.name == 'posix':
        cblas_libs.append('m')
        libraries.append('m')

    config = Configuration('cluster', parent_package, top_path)
    config.add_extension('_hierarchical',
                         sources=['_hierarchical.c'],
                         include_dirs=[numpy.get_include()],
                         libraries=libraries)

    config.add_extension(
        '_k_means',
        libraries=cblas_libs,
        sources=['_k_means.c'],
        include_dirs=[join('..', 'src', 'cblas'),
                      numpy.get_include(),
                      blas_info.pop('include_dirs', [])],
        extra_compile_args=blas_info.pop('extra_compile_args', []),
        **blas_info
    )
    return config
开发者ID:2011200799,项目名称:scikit-learn,代码行数:27,代码来源:setup.py


示例16: configuration

def configuration(parent_package='',top_path=None):
    from numpy.distutils.misc_util import Configuration
    config = Configuration('pyrex_ext',parent_package,top_path)
    config.add_extension('primes',
                         ['primes.pyx'])
    config.add_data_dir('tests')
    return config
开发者ID:arthornsby,项目名称:numpy,代码行数:7,代码来源:setup.py


示例17: configuration

def configuration(parent_package='', top_path=None):
   from numpy.distutils.misc_util import Configuration
   config = Configuration('spline2', parent_package, top_path)
   config.add_extension('spline2c',
                        sources=['spline2_nonint.c','spline2_wrap.c']
                        )
   return config
开发者ID:obscode,项目名称:snpy,代码行数:7,代码来源:setup.py


示例18: configuration

def configuration(parent_package="", top_path=None):
    from numpy.distutils.misc_util import Configuration

    config = Configuration("", parent_package, top_path)

    config.add_extension("c_library", sources=["c_library.pyf", "c_functions.c"])
    return config
开发者ID:eelcovv,项目名称:pywafo,代码行数:7,代码来源:setup.py


示例19: configuration

def configuration(parent_package='',top_path=None):
    from numpy.distutils.system_info import get_info, NotFoundError

    from numpy.distutils.misc_util import Configuration

    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']
    config.add_extension('_iterative',
                         sources = [join('iterative',x) for x in sources],
                         extra_info = lapack_opt
                         )

    config.add_data_dir('tests')

    return config
开发者ID:GaelVaroquaux,项目名称:scipy,代码行数:33,代码来源:setup.py


示例20: configuration

def configuration(parent_package='',top_path=None):
    from numpy.distutils.misc_util import Configuration
    config = Configuration('testing', parent_package, top_path)

    config.add_subpackage('_private')
    config.add_data_dir('tests')
    return config
开发者ID:Horta,项目名称:numpy,代码行数:7,代码来源:setup.py



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python system_info.get_info函数代码示例发布时间:2022-05-27
下一篇:
Python misc_util.quote_args函数代码示例发布时间:2022-05-27
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap