def _archive_package_sources(package, sources, sources_dir):
 manifest = []
 for s in sources:
  f = str(s)
  if f.startswith(sources_dir):
   path = os.path.relpath(f, sources_dir)
  else:
   path = os.path.basename(f)
  package(f, path)
  manifest.append(('%s %s' % (s.get_csig(), path)))
 return manifest

def _archive_package_sources ( package , sources , sources_dir ) : manifest = [ ] for s in sources : f = str ( s ) if f . startswith ( sources_dir ) : path = os . path . relpath ( f , sources_dir ) else : path = os . path . basename ( f ) package ( f , path ) manifest . append ( ( '%s %s' % ( s . get_csig ( ) , path ) ) ) return manifest
archive sources into the package and return a list of source info .