从命令行获取gyp版本?

时间:2014-04-28 06:24:47

标签: gyp

如何从命令行获取gyp版本?

我看了看这里: https://code.google.com/p/gyp/wiki/InputFormatReference

我尝试了常用命令-v -ver -version, --version, --help

1 个答案:

答案 0 :(得分:1)

据我所知,没有命令检查gyp版本。请参阅下面的gyp_main.py --help

rna@rna-P580:~/project/src/tools/gyp$ ./gyp_main.py --help
Usage: gyp_main.py [options ...] [build_file ...]

Options:
  -h, --help            show this help message and exit
  --build=CONFIGS       configuration for build after project generation
  --check               check format of gyp files
  --config-dir=CONFIG_DIR
                        The location for configuration files like
                        include.gypi.
  -d DEBUGMODE, --debug=DEBUGMODE
                        turn on a debugging mode for debugging GYP.  Supported
                        modes are "variables", "includes" and "general" or
                        "all" for all of them.
  -D VAR=VAL            sets variable VAR to value VAL
  --depth=PATH          set DEPTH gyp variable to a relative path to PATH
  -f FORMATS, --format=FORMATS
                        output formats to generate
  -G FLAG=VAL           sets generator flag FLAG to VAL
  --generator-output=DIR
                        puts generated build files under DIR
  --ignore-environment  do not read options from environment variables
  -I INCLUDE, --include=INCLUDE
                        files to include in all loaded .gyp files
  --no-circular-check   don't check for circular relationships between files
  --no-parallel         Disable multiprocessing
  -S SUFFIX, --suffix=SUFFIX
                        suffix to add to generated files
  --toplevel-dir=DIR    directory to use as the root of the source tree
  -R TARGET, --root-target=TARGET
                        include only TARGET and its deep dependencies

或者,如果您真的必须从命令行检查版本,可以cat ./tools/gyp/setup.py如下

rna@rna-P580:~/project/src/tools/gyp$ cat setup.py 
#!/usr/bin/env python

# Copyright (c) 2009 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.

from setuptools import setup

setup(
  name='gyp',
  version='0.1',
  description='Generate Your Projects',
  author='Chromium Authors',
  author_email='chromium-dev@googlegroups.com',
  url='http://code.google.com/p/gyp',
  package_dir = {'': 'pylib'},
  packages=['gyp', 'gyp.generator'],
  entry_points = {'console_scripts': ['gyp=gyp:script_main'] }
)