示例#1
0
文件: boost.py 项目: scopatz/fief
def build_a(ctx, pkg, src, opts):
  root = yield async.Sync(ctx.outfile_a(os.path.join('build', pkg)))
  root = os.path.abspath(root)
  os.mkdir(root)

  env = easy.gather_env(ctx, interfaces)
  cmdkws = {'cwd': src, 'tag': pkg, 'env': env}
  
  c = Cmd(ctx, **cmdkws)
  if os.name == 'nt':
    c.lit('bootstap.bat', '--prefix=' + root)
  else:
    c.lit('./bootstrap.sh', '--prefix=' + root)
  yield async.Sync(c.exec_a())

  c = Cmd(ctx, **cmdkws)
  c.lit('./b2', 'install')
  yield async.Sync(c.exec_a())

  built = {'root': root, 'pkg': pkg}
  yield async.Result(built)
示例#2
0
文件: libxml2.py 项目: scopatz/fief
def build_a(ctx, pkg, src, opts):
  root = yield async.Sync(ctx.outfile_a(os.path.join('build', pkg)))
  root = os.path.abspath(root)
  os.mkdir(root)

  env = easy.gather_env(ctx, interfaces)
  cmdkws = {'cwd': src, 'tag': pkg, 'env': env}

  c = Cmd(ctx, **cmdkws)
  c.lit('./configure', '--prefix=' + root)
  yield async.Sync(c.exec_a())

  c = Cmd(ctx, **cmdkws)
  c.lit('make', '-j', '3')
  yield async.Sync(c.exec_a())

  c = Cmd(ctx, **cmdkws)
  c.lit('make', 'install')
  yield async.Sync(c.exec_a())

  delivs = {'root': root, 'pkg': pkg}
  yield async.Result(delivs)