예제 #1
0
def symlink_dirs():
  """Symlink folders for use on appengine."""
  symlink_config_dir()

  common.symlink(
      src=os.path.join('src', 'protos'),
      target=os.path.join(SRC_DIR_PY, 'protos'))
  common.symlink(
      src=os.path.join('src', 'python'),
      target=os.path.join(SRC_DIR_PY, 'python'))
  # While importing third party modules, we may call pkg_resources.
  # pkg_resources normalizes paths by calling os.path.realpath on them, which is
  # incompatible with the App Engine sandbox since the resulting path will no
  # longer be under appengine/.
  common.copy_dir(
      src=os.path.join('src', 'third_party'),
      target=os.path.join(SRC_DIR_PY, 'third_party'))

  # Remove existing local_gcs symlink (if any). This is important, as otherwise
  # we will try deploying the directory in production. This is only needed for
  # local development in run_server.
  local_gcs_symlink_path = os.path.join(SRC_DIR_PY, 'local_gcs')
  common.remove_symlink(local_gcs_symlink_path)

  _, output = common.execute('bazel run //local:create_gopath', cwd='src')
  os.environ['GOPATH'] = output.splitlines()[-1]
예제 #2
0
def symlink_dirs():
    """Symlink folders for use on appengine."""
    symlink_config_dir()

    common.symlink(src=os.path.join('src', 'clusterfuzz'),
                   target=os.path.join(SRC_DIR_PY, 'clusterfuzz'))

    # Remove existing local_gcs symlink (if any). This is important, as otherwise
    # we will try deploying the directory in production. This is only needed for
    # local development in run_server.
    local_gcs_symlink_path = os.path.join(SRC_DIR_PY, 'local_gcs')
    common.remove_symlink(local_gcs_symlink_path)