Пример #1
0
def main():
    """Launches dev_appserver.py."""
    runtimes = wrapper_util.GetRuntimes(sys.argv[1:])
    components = wrapper_util.GetComponents(runtimes)
    options = wrapper_util.ParseDevAppserverFlags(sys.argv[1:])
    if options.support_datastore_emulator:
        components.append('cloud-datastore-emulator')
    update_manager.UpdateManager.EnsureInstalledAndRestart(components,
                                                           command=__file__)

    args = ['--skip_sdk_update_check=True']

    google_analytics_client_id = metrics.GetCIDIfMetricsEnabled()
    google_analytics_user_agent = metrics.GetUserAgentIfMetricsEnabled()
    if google_analytics_client_id:
        args.extend([
            '--google_analytics_client_id={}'.format(
                google_analytics_client_id),
            '--google_analytics_user_agent={}'.format(
                google_analytics_user_agent)
        ])

    # Pass the path to cloud datastore emulator to dev_appserver.
    sdk_root = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
    emulator_dir = os.path.join(sdk_root, 'platform',
                                'cloud-datastore-emulator')
    emulator_script = ('cloud_datastore_emulator.cmd'
                       if platforms.OperatingSystem.IsWindows() else
                       'cloud_datastore_emulator')
    args.append('--datastore_emulator_cmd={}'.format(
        os.path.join(emulator_dir, emulator_script)))

    bootstrapping.ExecutePythonTool(
        os.path.join('platform', 'google_appengine'), 'dev_appserver.py',
        *args)
Пример #2
0
def main():
  """Launches dev_appserver.py."""
  runtimes = wrapper_util.GetRuntimes(sys.argv[1:])
  components = wrapper_util.GetComponents(runtimes)
  options = wrapper_util.ParseDevAppserverFlags(sys.argv[1:])
  if options.support_datastore_emulator:
    components.append('cloud-datastore-emulator')
  update_manager.UpdateManager.EnsureInstalledAndRestart(
      components,
      command=__file__)

  args = [
      '--skip_sdk_update_check=True'
  ]

  google_analytics_client_id = metrics.GetCIDIfMetricsEnabled()
  google_analytics_user_agent = metrics.GetUserAgentIfMetricsEnabled()
  if google_analytics_client_id:
    args.extend([
        '--google_analytics_client_id={}'.format(google_analytics_client_id),
        '--google_analytics_user_agent={}'.format(google_analytics_user_agent)
    ])

  bootstrapping.ExecutePythonTool(
      os.path.join('platform', 'google_appengine'), 'dev_appserver.py', *args)
Пример #3
0
def main():
    """Runs endpointscfg.py."""
    update_manager.UpdateManager.EnsureInstalledAndRestart(
        ['app-engine-python'], command=__file__)

    bootstrapping.ExecutePythonTool(
        os.path.join('platform', 'google_appengine'), 'endpointscfg.py')
Пример #4
0
def main():
    """Launches dev_appserver.py."""
    runtimes = wrapper_util.GetRuntimes(sys.argv[1:])
    components = wrapper_util.GetComponents(runtimes)
    update_manager.UpdateManager.EnsureInstalledAndRestart(components,
                                                           command=__file__)

    args = [
        '--skip_sdk_update_check=True',
        '--application={}'.format(properties.VALUES.core.project.Get())
    ]

    google_analytics_client_id = metrics.GetCIDIfMetricsEnabled()
    google_analytics_user_agent = metrics.GetUserAgentIfMetricsEnabled()
    if google_analytics_client_id:
        args.extend([
            '--google_analytics_client_id={}'.format(
                google_analytics_client_id),
            '--google_analytics_user_agent={}'.format(
                google_analytics_user_agent)
        ])

    bootstrapping.ExecutePythonTool(
        os.path.join('platform', 'google_appengine'), 'dev_appserver.py',
        *args)
Пример #5
0
def main():
  """Launches dev_appserver.py."""
  runtimes = wrapper_util.GetRuntimes(sys.argv[1:])
  components = wrapper_util.GetComponents(runtimes)
  update_manager.UpdateManager.EnsureInstalledAndRestart(
      components,
      command=__file__)

  args = [
      '--skip_sdk_update_check=True'
  ]

  bootstrapping.ExecutePythonTool(
      os.path.join('platform', 'google_appengine'), 'dev_appserver.py', *args)
Пример #6
0
def main():
    """Launches appcfg.py."""

    unused_project, account = bootstrapping.GetActiveProjectAndAccount()
    json_creds = config.Paths().LegacyCredentialsJSONPath(account)

    args = [
        '--oauth2',
        '--oauth2_client_id=32555940559.apps.googleusercontent.com',
        '--oauth2_client_secret=ZmssLNjJy2998hD4CTg2ejr2',
        '--oauth2_credential_file={0}'.format(json_creds),
        '--skip_sdk_update_check'
    ]

    bootstrapping.ExecutePythonTool('platform/google_appengine', 'appcfg.py',
                                    *args)
Пример #7
0
def main():
  """Launches dev_appserver.py."""
  argv = bootstrapping.GetDecodedArgv()
  runtimes = wrapper_util.GetRuntimes(argv[1:])
  options = wrapper_util.ParseDevAppserverFlags(sys.argv[1:])
  if options.support_datastore_emulator:
    java.RequireJavaInstalled(datastore_util.DATASTORE_TITLE, min_version=8)
  components = wrapper_util.GetComponents(runtimes)
  components.append('cloud-datastore-emulator')
  if (platforms.OperatingSystem.Current() == platforms.OperatingSystem.LINUX
      and 'app-engine-php' in components):
    components.remove('app-engine-php')
  update_manager.UpdateManager.EnsureInstalledAndRestart(
      components,
      command=__file__)

  args = [
      '--skip_sdk_update_check=True'
  ]

  google_analytics_client_id = metrics.GetCIDIfMetricsEnabled()
  google_analytics_user_agent = metrics.GetUserAgentIfMetricsEnabled()
  if google_analytics_client_id:
    args.extend([
        '--google_analytics_client_id={}'.format(google_analytics_client_id),
        '--google_analytics_user_agent={}'.format(google_analytics_user_agent)
    ])

  # Pass the path to cloud datastore emulator to dev_appserver.
  # realpath is needed in the case where __file__ is a path containing symlinks.
  sdk_root = os.path.dirname(
      os.path.dirname(os.path.abspath(os.path.realpath(__file__))))
  emulator_dir = os.path.join(sdk_root, 'platform', 'cloud-datastore-emulator')
  emulator_script = (
      'cloud_datastore_emulator.cmd' if platforms.OperatingSystem.IsWindows()
      else 'cloud_datastore_emulator')
  args.append('--datastore_emulator_cmd={}'.format(
      os.path.join(emulator_dir, emulator_script)))

  bootstrapping.ExecutePythonTool(
      os.path.join('platform', 'google_appengine'), 'dev_appserver.py', *args)
Пример #8
0
def main():
    """Launches dev_appserver.py."""

    bootstrapping.ExecutePythonTool('platform/google_appengine',
                                    'endpointscfg.py')