node/deps/npm/node_modules/node-gyp/legacy/tools/gyp/PRESUBMIT.py
isaacs bcb0cc0b18 Upgrade npm to 1.1.6
* Fix #472 Adds support for os/cpu fields in package.json (Adam Blackburn)
* Don't use existing pkg if explicit
* Install missing deps, even if they are in bundleDependencies
* bundle node-gyp
* Automatically node-gyp build stuff with a bindings.gyp
* Fix #2230 Unpack in place. No folder renaming malarky
* Never create un-listable directories
* Fix cases where an optionalDependency fails to build
* Always ignore .wafpickle-7 files
* fix shrinkwrap test
* Fix: bundleDependencies being re-installed unnecessarily
2012-03-12 21:34:07 -07:00

52 lines
1.4 KiB
Python

# 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.
"""Top-level presubmit script for GYP.
See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts
for more details about the presubmit API built into gcl.
"""
def CheckChangeOnUpload(input_api, output_api):
report = []
report.extend(input_api.canned_checks.PanProjectChecks(
input_api, output_api))
return report
def CheckChangeOnCommit(input_api, output_api):
report = []
license = (
r'.*? Copyright \(c\) %(year)s Google Inc\. All rights reserved\.\n'
r'.*? Use of this source code is governed by a BSD-style license that '
r'can be\n'
r'.*? found in the LICENSE file\.\n'
) % {
'year': input_api.time.strftime('%Y'),
}
report.extend(input_api.canned_checks.PanProjectChecks(
input_api, output_api, license_header=license))
report.extend(input_api.canned_checks.CheckTreeIsOpen(
input_api, output_api,
'http://gyp-status.appspot.com/status',
'http://gyp-status.appspot.com/current'))
import sys
old_sys_path = sys.path
try:
sys.path = ['pylib', 'test/lib'] + sys.path
report.extend(input_api.canned_checks.RunPylint(
input_api,
output_api))
finally:
sys.path = old_sys_path
return report
def GetPreferredTrySlaves():
return ['gyp-win32', 'gyp-win64', 'gyp-linux', 'gyp-mac']