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


Python Path.glob方法代码示例

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


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

示例1: build

# 需要导入模块: from fbuild.path import Path [as 别名]
# 或者: from fbuild.path.Path import glob [as 别名]
def build(ctx):
    rec = configure(ctx)
    src = rec.dasm.translate('src/x86_64.dasc', 'codegen.c')
    rejit = rec.c.build_lib('rejit', Path.glob('src/*.c') + Path.glob('utf/*.c'),
        includes=['.', ctx.buildroot])
    rec.c.build_exe('bench', ['bench.c'], libs=[rejit])
    rec.c.build_exe('ex', ['ex.c'], libs=[rejit])
    if rec.tests:
        rec.c.build_exe('tst', ['tst.c'], cflags=rec.testflags, libs=[rejit])
开发者ID:kirbyfan64,项目名称:rejit,代码行数:11,代码来源:fbuildroot.py

示例2: build_flx_drivers

# 需要导入模块: from fbuild.path import Path [as 别名]
# 或者: from fbuild.path.Path import glob [as 别名]
def build_flx_drivers(phase):
    path = Path('src/compiler/drivers')

    call('buildsystem.ocs.build_exe', phase)

    lib = phase.ocaml.build_lib(path / 'flx_driver',
        srcs=Path.glob(path / '*.ml{,i}'))

    return {
        'flxi': phase.ocaml.build_exe('bin/flxi',
            srcs=Path(path / 'flxi' / '*.ml{,i}').glob(),
            libs=[
                call('buildsystem.dypgen.build_lib', phase),
                call('buildsystem.ocs.build_lib', phase),
                lib,
                build_flx_misc(phase),
                build_flx_core(phase),
                build_flx_parse(phase),
                build_flx_bind(phase),
                build_flx_codegen(phase)],
            external_libs=[
                'batteries',
                'threads',
                'llvm',
                'llvm_analysis',
                'llvm_executionengine',
                'llvm_scalar_opts',
                'llvm_target'],
            flags=['-thread'],
            packages=['batteries'],
            cc=phase.cxx.static.compiler.gcc.exe) }
开发者ID:erickt,项目名称:felix2,代码行数:33,代码来源:flx_compiler.py

示例3: build

# 需要导入模块: from fbuild.path import Path [as 别名]
# 或者: from fbuild.path.Path import glob [as 别名]
def build(phase, felix):
    print ("BUILDING PLUGINS")
    for f in Path.glob('src/lib/plugins/*'):
      copy(ctx=phase.ctx, src=f, dst=phase.ctx.buildroot / 'share'/f[4:]) 
    plugins = [
      #"ocaml2html",
      #"py2html",
      #"fdoc2html",
      #"flx2html",
      #"cpp2html",
      #"fpc2html",
      #"fdoc_slideshow",
      #"fdoc_paragraph",
      #"fdoc_heading",
      #"fdoc_fileseq",
      #"fdoc_scanner",
      #"fdoc_button",
      "toolchain_clang_osx",
      "toolchain_clang_linux",
      "toolchain_gcc_osx",
      "toolchain_gcc_linux",
      "toolchain_gcc48_linux",
      ]
    for base in plugins:
      shlib = felix.compile(phase.ctx.buildroot/('share/lib/plugins/'+base+'.flx'),flags=['-od',phase.ctx.buildroot/'host/lib/rtl'])
开发者ID:martindemello,项目名称:felix,代码行数:27,代码来源:plugins.py

示例4: build_flx_core

# 需要导入模块: from fbuild.path import Path [as 别名]
# 或者: from fbuild.path.Path import glob [as 别名]
def build_flx_core(phase):
    path = Path('src/compiler/flx_core')
    return phase.ocaml.build_lib(path / 'flx_core',
        srcs=Path.glob(path / '*.ml{,i}'),
        libs=[build_flx_misc(phase)],
        external_libs=['nums'],
        packages=['batteries'])
开发者ID:erickt,项目名称:felix2,代码行数:9,代码来源:flx_compiler.py

示例5: build_flx_drivers

# 需要导入模块: from fbuild.path import Path [as 别名]
# 或者: from fbuild.path.Path import glob [as 别名]
def build_flx_drivers(ctx, phase):
    libs = [
        call('buildsystem.ocs.build_lib', phase),
        call('buildsystem.sex.build', phase),
        call('buildsystem.dypgen.build_lib', phase),
        build_flx_version(phase),
        build_flx_lex(phase),
        build_flx_parse(phase),
        build_flx_misc(phase),
        build_flx_file(phase),
        build_flx_core(phase),
        build_flx_desugar(phase),
        build_flx_bind(phase),
        build_flx_frontend(phase),
        build_flx_opt(phase),
        build_flx_lower(phase),
        build_flx_backend(phase),
        build_flx_cpp_backend(phase),
        build_flx_version_hook(phase),
        ]

    external_libs = ['nums', 'unix', 'str']

    flxg = phase.ocaml.build_exe('host/bin/flxg',
        Path.glob('src/compiler/flxg/*.ml{,i}'),
        libs=libs,
        external_libs=external_libs)

    return Record(
        flxg=flxg,
    )
开发者ID:DawidvC,项目名称:felix,代码行数:33,代码来源:flx_compiler.py

示例6: build_lib

# 需要导入模块: from fbuild.path import Path [as 别名]
# 或者: from fbuild.path.Path import glob [as 别名]
def build_lib(phase):
    path = Path('src/compiler/dypgen/dyplib')

    # dyplib cannot be built with ocamlcp.
    ocaml = phase.ocamlc if phase.ocaml == phase.ocamlcp else phase.ocaml

    return ocaml.build_lib(path/'dyp', Path.glob(path/'*.ml{,i}'))
开发者ID:erickt,项目名称:felix2,代码行数:9,代码来源:dypgen.py

示例7: build_midifi

# 需要导入模块: from fbuild.path import Path [as 别名]
# 或者: from fbuild.path.Path import glob [as 别名]
def build_midifi(ctx, rec, midifile):
    all_sources = []
    for pat in 'midifi/*.flx', 'sfml/sfml/*.flx', 'midifile-flx/midifile.flx':
        all_sources.extend(Path.glob(pat))

    rec.felix.compile('midifi', 'midifi.flx', all_sources, rec.static,
                      includes=['sfml', 'midifile', 'midifile-flx'],
                      pkgconfig_paths=['build/config'], libs=[midifile])
开发者ID:midifi,项目名称:midifi,代码行数:10,代码来源:fbuildroot.py

示例8: build

# 需要导入模块: from fbuild.path import Path [as 别名]
# 或者: from fbuild.path.Path import glob [as 别名]
def build(ctx):
    rec = configure(ctx)
    static = rec.static
    shared = rec.shared
    libregexp = static.build_lib('regexp9', Path.glob('libregexp/*.c',
                                                      exclude=['*test*.c']))
    static.build_exe('o', ['o.c'], libs=[libregexp])
    static.build_exe('tst', ['o.c'], macros=['UTEST'], libs=[libregexp])
开发者ID:phase,项目名称:o,代码行数:10,代码来源:fbuildroot.py

示例9: build_runtime

# 需要导入模块: from fbuild.path import Path [as 别名]
# 或者: from fbuild.path.Path import glob [as 别名]
def build_runtime(host_phase, target_phase):
    path = Path('src', 'rtl')

    buildsystem.copy_hpps_to_rtl(target_phase.ctx,
        path / 'flx_rtl.hpp',
        path / 'flx_rtl_shapes.hpp',
        path / 'flx_compiler_support_headers.hpp',
        path / 'flx_compiler_support_bodies.hpp',
        path / 'flx_dynlink.hpp',
        path / 'flx_i18n.hpp',
        path / 'flx_ioutil.hpp',
        path / 'flx_strutil.hpp',
        path / 'flx_executil.hpp',
        path / 'flx_sync.hpp',
        path / 'flx_world.hpp',
        path / 'flx_async_world.hpp',
        path / 'flx_world_config.hpp',
        path / 'plat_linux.hpp',
    )

    for f in Path.glob(path/"*.hpp"):
      print("Copying " + f + " --> " +target_phase.ctx.buildroot/f )
      copy(ctx=target_phase.ctx, src=f,dst=target_phase.ctx.buildroot/f)

    srcs = [copy(ctx=target_phase.ctx, src=f, dst=target_phase.ctx.buildroot / f) for f in Path.glob(path / '*.cpp')]
    includes = [
        target_phase.ctx.buildroot / 'host/lib/rtl',
        target_phase.ctx.buildroot / 'share/lib/rtl'
    ]
    macros = ['BUILD_RTL']
    libs = [
        call('buildsystem.flx_async.build_runtime', host_phase,target_phase),
        call('buildsystem.flx_exceptions.build_runtime', target_phase),
        call('buildsystem.flx_gc.build_runtime', host_phase, target_phase),
    ]

    dlfcn_h = config_call('fbuild.config.c.posix.dlfcn_h',
        target_phase.platform,
        target_phase.cxx.static,
        target_phase.cxx.shared)

    if dlfcn_h.dlopen:
        external_libs = dlfcn_h.external_libs
    else:
        external_libs = []

    dst = 'host/lib/rtl/flx'
    return Record(
        static=buildsystem.build_cxx_static_lib(target_phase, dst, srcs,
            includes=includes,
            macros=macros,
            libs=[lib.static for lib in libs],
            external_libs=external_libs),
        shared=buildsystem.build_cxx_shared_lib(target_phase, dst, srcs,
            includes=includes,
            macros=macros,
            libs=[lib.shared for lib in libs],
            external_libs=external_libs))
开发者ID:FelixKiprono,项目名称:felix,代码行数:60,代码来源:flx_rtl.py

示例10: build_flx_bind

# 需要导入模块: from fbuild.path import Path [as 别名]
# 或者: from fbuild.path.Path import glob [as 别名]
def build_flx_bind(phase):
    path = Path('src', 'compiler', 'flx_bind')
    return phase.ocaml.build_lib(path / 'flx_bind',
        srcs=Path.glob(path / '*.ml{,i}'),
        libs=[
            build_flx_misc(phase),
            build_flx_core(phase),
            build_flx_parse(phase)],
        packages=['batteries'])
开发者ID:erickt,项目名称:felix2,代码行数:11,代码来源:flx_compiler.py

示例11: build_flx_codegen

# 需要导入模块: from fbuild.path import Path [as 别名]
# 或者: from fbuild.path.Path import glob [as 别名]
def build_flx_codegen(phase):
    path = Path('src', 'compiler', 'flx_codegen')
    return phase.ocaml.build_lib(path / 'flx_codegen',
        srcs=Path.glob(path / '*.ml{,i}'),
        includes=[phase.llvm_config.ocaml_libdir()],
        libs=[
            build_flx_misc(phase),
            build_flx_core(phase)],
        packages=['batteries'])
开发者ID:erickt,项目名称:felix2,代码行数:11,代码来源:flx_compiler.py

示例12: build_midifile

# 需要导入模块: from fbuild.path import Path [as 别名]
# 或者: from fbuild.path.Path import glob [as 别名]
def build_midifile(ctx, rec):
    if isinstance(rec.shared, MsvcBuilder):
        builder = rec.shared
        lflags = ['/DEBUG'] if not ctx.options.release else []
    else:
        builder = rec.static
        lflags = []
    return builder.build_lib('midifile',
        Path.glob('midifile/src-library/*.cpp'), includes=['midifile/include'],
        lflags=lflags)
开发者ID:midifi,项目名称:midifi,代码行数:12,代码来源:fbuildroot.py

示例13: build

# 需要导入模块: from fbuild.path import Path [as 别名]
# 或者: from fbuild.path.Path import glob [as 别名]
def build(ctx):
    ocaml = fbuild.builders.ocaml.ocamlfind.Ocaml(ctx,
        packages=['unix'])

    libb = ocaml.ocamlc.build_lib('libb', Path.glob('b*.ml{,i}'),
        packages=['num'])
    liba = ocaml.ocamlc.build_lib('liba', Path.glob('a*.ml{,i}'), libs=[libb])
    exe  = ocaml.ocamlc.build_exe('exe.byte', ['exe.ml'],
        libs=[libb, liba],
        packages=['num'])

    ctx.logger.log(' * running %s:' % exe)
    ctx.execute([exe])

    libb = ocaml.ocamlopt.build_lib('libb', Path.glob('b*.ml{,i}'),
        packages=['num'])
    liba = ocaml.ocamlopt.build_lib('liba', Path.glob('a*.ml{,i}'), libs=[libb])
    exe  = ocaml.ocamlopt.build_exe('exe.native', ['exe.ml'],
        libs=[libb, liba],
        packages=['num'])

    ctx.logger.log(' * running %s:' % exe)
    ctx.execute([exe])

    # We can also build bytecode and native libraries at the same time.
    libb = ocaml.build_lib('libb', Path.glob('b*.ml{,i}'),
        packages=['num'])
    liba = ocaml.build_lib('liba', Path.glob('a*.ml{,i}'), libs=[libb])
    exe  = ocaml.build_exe('exe', ['exe.ml'],
        libs=[libb, liba],
        packages=['num']).bytecode
开发者ID:DawidvC,项目名称:felix,代码行数:33,代码来源:fbuildroot.py

示例14: build

# 需要导入模块: from fbuild.path import Path [as 别名]
# 或者: from fbuild.path.Path import glob [as 别名]
def build(ctx):
    ocaml = fbuild.builders.ocaml.batteries.Ocaml(ctx)

    lib = ocaml.ocamlc.build_lib('lib', Path.glob('lib*.ml{,i}'),
        packages=['sexplib.syntax'])
    print('here', lib)
    exe = ocaml.ocamlc.build_exe('exe.byte', ['exe.ml'], libs=[lib])

    ctx.logger.log(' * running %s:' % exe)
    ctx.execute([exe])

    lib = ocaml.ocamlopt.build_lib('lib', Path.glob('lib*.ml{,i}'),
        packages=['sexplib.syntax'])
    exe = ocaml.ocamlopt.build_exe('exe.byte', ['exe.ml'], libs=[lib])

    ctx.logger.log(' * running %s:' % exe)
    ctx.execute([exe])

    # We can also build bytecode and native libraries at the same time.
    lib = ocaml.build_lib('lib', Path.glob('lib*.ml{,i}'),
        packages=['sexplib.syntax'])
    exe = ocaml.build_exe('exe', ['exe.ml'], libs=[lib]).bytecode
开发者ID:DawidvC,项目名称:felix,代码行数:24,代码来源:fbuildroot.py

示例15: build

# 需要导入模块: from fbuild.path import Path [as 别名]
# 或者: from fbuild.path.Path import glob [as 别名]
def build(ctx):
    rec = configure(ctx)
    flex = rec.flex
    bison = rec.bison
    c = rec.c
    pthread = rec.pthread
    cflags = rec.cflags
    ldlibs = rec.ldlibs

    lex, hdr = flex('src/lex.l', 'lex.h')
    yacc = bison('src/parse.y', defines=True)
    c.build_exe('tst', ['tst.c', lex, yacc]+Path.glob('src/*.c'),
        cflags=cflags, includes=['src', hdr.parent], ldlibs=ldlibs)

    lightbuild_opts = {}
    if pthread.header:
        lightbuild_opts['macros'] = ['HAVE_PTHREAD_H=1']
        lightbuild_opts['external_libs'] = pthread.external_libs
    c.build_exe('lightbuild', ['lightbuild/lightbuild.c'], ldlibs=ldlibs,
                **lightbuild_opts)
开发者ID:kirbyfan64,项目名称:blaze,代码行数:22,代码来源:fbuildroot.py


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