コード例 #1
0
ファイル: test_pex.py プロジェクト: atojs/commons
def write_pex(td, exe_contents):
  with open(os.path.join(td, 'exe.py'), 'w') as fp:
    fp.write(exe_contents)

  pb = PEXBuilder(path=td)
  pb.set_executable(os.path.join(td, 'exe.py'))
  pb.freeze()

  return pb
コード例 #2
0
def write_pex(td, exe_contents):
    with open(os.path.join(td, 'exe.py'), 'w') as fp:
        fp.write(exe_contents)

    pb = PEXBuilder(path=td)
    pb.set_executable(os.path.join(td, 'exe.py'))
    pb.freeze()

    return pb
コード例 #3
0
def write_pex(td, exe_contents, dists=None):
    dists = dists or []

    with open(os.path.join(td, "exe.py"), "w") as fp:
        fp.write(exe_contents)

    pb = PEXBuilder(path=td)
    for dist in dists:
        pb.add_egg(dist.location)
    pb.set_executable(os.path.join(td, "exe.py"))
    pb.freeze()

    return pb
コード例 #4
0
def write_pex(td, exe_contents, dists=None):
    dists = dists or []

    with open(os.path.join(td, 'exe.py'), 'w') as fp:
        fp.write(exe_contents)

    pb = PEXBuilder(path=td)
    for dist in dists:
        pb.add_egg(dist.location)
    pb.set_executable(os.path.join(td, 'exe.py'))
    pb.freeze()

    return pb