def _generate_tar_package(target, sources, sources_dir, suffix):
 mode = _get_tar_mode_from_suffix(suffix)
 tar = tarfile.open(target, mode)
 manifest = _archive_package_sources(tar.add, sources, sources_dir)
 manifest_path = ('%s.MANIFEST' % target)
 m = open(manifest_path, 'w')
 print >>m, ('\n'.join(manifest) + '\n')
 m.close()
 tar.add(manifest_path, _PACKAGE_MANIFEST)
 tar.close()
 return None

def _generate_tar_package ( target , sources , sources_dir , suffix ) : mode = _get_tar_mode_from_suffix ( suffix ) tar = tarfile . open ( target , mode ) manifest = _archive_package_sources ( tar . add , sources , sources_dir ) manifest_path = ( '%s.MANIFEST' % target ) m = open ( manifest_path , 'w' ) print >> m , ( '\n' . join ( manifest ) + '\n' ) m . close ( ) tar . add ( manifest_path , _PACKAGE_MANIFEST ) tar . close ( ) return None
generate a tar ball containing all of the source files .