Sha256: df3995bf653cce738a52d90349f11897e93ffdcf0d4c30abf1da2b0122940816

Contents?: true

Size: 1.63 KB

Versions: 117

Compression:

Stored size: 1.63 KB

Contents

# Copyright (c) 2011 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

"""gypsh output module

gypsh is a GYP shell.  It's not really a generator per se.  All it does is
fire up an interactive Python session with a few local variables set to the
variables passed to the generator.  Like gypd, it's intended as a debugging
aid, to facilitate the exploration of .gyp structures after being processed
by the input module.

The expected usage is "gyp -f gypsh -D OS=desired_os".
"""


import code
import sys


# All of this stuff about generator variables was lovingly ripped from gypd.py.
# That module has a much better description of what's going on and why.
_generator_identity_variables = [
  'EXECUTABLE_PREFIX',
  'EXECUTABLE_SUFFIX',
  'INTERMEDIATE_DIR',
  'PRODUCT_DIR',
  'RULE_INPUT_ROOT',
  'RULE_INPUT_DIRNAME',
  'RULE_INPUT_EXT',
  'RULE_INPUT_NAME',
  'RULE_INPUT_PATH',
  'SHARED_INTERMEDIATE_DIR',
]

generator_default_variables = {
}

for v in _generator_identity_variables:
  generator_default_variables[v] = '<(%s)' % v


def GenerateOutput(target_list, target_dicts, data, params):
  locals = {
        'target_list':  target_list,
        'target_dicts': target_dicts,
        'data':         data,
      }

  # Use a banner that looks like the stock Python one and like what
  # code.interact uses by default, but tack on something to indicate what
  # locals are available, and identify gypsh.
  banner='Python %s on %s\nlocals.keys() = %s\ngypsh' % \
         (sys.version, sys.platform, repr(sorted(locals.keys())))

  code.interact(banner, local=locals)

Version data entries

117 entries across 110 versions & 26 rubygems

Version Path
optimacms-0.1.61 spec/dummy/node_modules/node-gyp/gyp/pylib/gyp/generator/gypsh.py
libv8-3.16.14.19.1 vendor/gyp/pylib/gyp/generator/gypsh.py
disco_app-0.18.0 test/dummy/node_modules/node-gyp/gyp/pylib/gyp/generator/gypsh.py
disco_app-0.18.2 test/dummy/node_modules/node-gyp/gyp/pylib/gyp/generator/gypsh.py
mt-libuv-4.1.04 ext/gyp/pylib/gyp/generator/gypsh.py
mt-libuv-4.1.03 ext/gyp/pylib/gyp/generator/gypsh.py
mt-libuv-4.1.02 ext/gyp/pylib/gyp/generator/gypsh.py
tang-0.2.1 spec/tang_app/node_modules/node-gyp/gyp/pylib/gyp/generator/gypsh.py
groonga-client-model-6.0.0 test/apps/rails6.0.3.5/node_modules/node-gyp/gyp/pylib/gyp/generator/gypsh.py
groonga-client-model-6.0.0 test/apps/rails6.1.3/node_modules/node-gyp/gyp/pylib/gyp/generator/gypsh.py
ruby2js-4.0.4 lib/tasks/testrails/node_modules/node-gyp/gyp/pylib/gyp/generator/gypsh.py
ruby2js-4.0.3 lib/tasks/testrails/node_modules/node-gyp/gyp/pylib/gyp/generator/gypsh.py
tang-0.2.0 spec/tang_app/node_modules/node-gyp/gyp/pylib/gyp/generator/gypsh.py
tang-0.1.0 spec/tang_app/node_modules/node-gyp/gyp/pylib/gyp/generator/gypsh.py
tang-0.0.9 spec/tang_app/node_modules/node-gyp/gyp/pylib/gyp/generator/gypsh.py
enju_library-0.3.8 spec/dummy/node_modules/node-gyp/gyp/pylib/gyp/generator/gypsh.py
ilog-0.4.1 node_modules/node-gyp/gyp/pylib/gyp/generator/gypsh.py
ilog-0.4.0 node_modules/node-gyp/gyp/pylib/gyp/generator/gypsh.py
ilog-0.3.3 node_modules/node-gyp/gyp/pylib/gyp/generator/gypsh.py
jester-data-8.0.0 node_modules/node-gyp/gyp/pylib/gyp/generator/gypsh.py