Esempio n. 1
0
def _PostProcessZips(tmpdir, buildout):
    """Run the post processor on the zipfiles.

  Args:
    tmpdir: the location to work on the files
    buildout: the location of the zip files
  """
    #copy the zip files to a new temp directory
    workdir = os.path.join(tmpdir.strip(), 'postprocess')
    os.makedirs(workdir)
    print 'copying zip files from %s to %s' % (buildout, workdir)
    for zipfile in glob.glob(os.path.join(buildout, '*.zip')):
        shutil.copy(zipfile, os.path.join(workdir, os.path.basename(zipfile)))
    #process the zip files to add any files
    postprocess.processZips(workdir)
    #copy the zip files back
    print 'copying zip files from %s to %s' % (workdir, buildout)
    for zipfile in glob.glob(os.path.join(workdir, '*.zip')):
        shutil.copy(zipfile, os.path.join(buildout, os.path.basename(zipfile)))
Esempio n. 2
0
File: build.py Progetto: ermh/Dart
def _PostProcessZips(tmpdir, buildout):
  """Run the post processor on the zipfiles.

  Args:
    tmpdir: the location to work on the files
    buildout: the location of the zip files
  """
  #copy the zip files to a new temp directory
  workdir = os.path.join(tmpdir.strip(), 'postprocess')
  os.makedirs(workdir)
  print 'copying zip files from %s to %s' % (buildout, workdir)
  for zipfile in glob.glob(os.path.join(buildout, '*.zip')):
    shutil.copy(zipfile, os.path.join(workdir, os.path.basename(zipfile)))
  #process the zip files to add any files
  postprocess.processZips(workdir)
  #copy the zip files back
  print 'copying zip files from %s to %s' % (workdir, buildout)
  for zipfile in glob.glob(os.path.join(workdir, '*.zip')):
    shutil.copy(zipfile, os.path.join(buildout, os.path.basename(zipfile)))