def Make(input_directory, output_directory, base_name, maximum_size=sys.maxint,
         include_predicate=lambda name: True):
  zip_names = []
  abs_dir = os.path.abspath(input_directory)
  for dirpath, _, files in os.walk(abs_dir):
    if dirpath == abs_dir:
      prefix = ''
    else:
      assert dirpath.startswith(abs_dir)
      prefix = dirpath[len(abs_dir) + 1:].replace(os.sep, '/') + '/'


    zip_names.extend([prefix + f for f in files])

  with _Maker(output_directory, base_name, maximum_size) as maker:
    for name in sorted(zip_names):
      abs_fs_name = os.path.join(abs_dir, os.path.normpath(name))

      if include_predicate(name):
        size = os.path.getsize(abs_fs_name)
        if size > maximum_size:
          raise JarWriteError(
              'File %s has size %d which is bigger than the maximum '
              'jar size %d' % (abs_fs_name, size, maximum_size))
        maker.Write(name, abs_fs_name)
Teardown Parameters
dataset/ETHPy150Open GoogleCloudPlatform/python-compat-runtime/appengine-compat/exported_appengine_sdk/google/appengine/tools/jarfile.py/Make--crossover with--dataset/ETHPy150Open neurodata/ndstore/test/test_json.py/Test_Project_Json.teardown_class