[infra] Remove dependency on gyp

R=rmacnak@google.com, whesse@google.com

Review-Url: https://codereview.chromium.org/3003433002 .
This commit is contained in:
Zach Anderson 2017-08-18 08:51:36 -07:00
parent ebe2ce681e
commit 783f1e8c04
3 changed files with 1 additions and 47 deletions

5
DEPS
View file

@ -33,7 +33,6 @@ vars = {
# "github_dartlang": "https://github.com/dart-lang/%s.git",
"co19_rev": "@dec2b67aaab3bb7339b9764049707e71e601da3d",
"gyp_rev": "@4801a5331ae62da9769a327f11c4213d32fb0dad",
# Revisions of GN related dependencies. This should match the revision
# pulled by Flutter.
@ -140,10 +139,6 @@ vars = {
}
deps = {
# Stuff needed for GYP to run.
Var("dart_root") + "/third_party/gyp":
Var('chromium_git') + '/external/gyp.git' + Var("gyp_rev"),
# Stuff needed for GN build.
Var("dart_root") + "/buildtools":
Var("fuchsia_git") + "/buildtools" + Var("buildtools_revision"),

View file

@ -17,14 +17,10 @@ import sys
script_dir = os.path.dirname(os.path.realpath(__file__))
chrome_src = os.path.abspath(os.path.join(script_dir, os.pardir))
SRC_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
sys.path.insert(1, os.path.join(chrome_src, 'tools'))
sys.path.insert(0, os.path.join(chrome_src, 'third_party', 'gyp', 'pylib'))
sys.path.insert(0, os.path.join(chrome_src, 'tools'))
json_data_file = os.path.join(script_dir, 'win_toolchain.json')
import gyp
# Use MSVS2015 as the default toolchain.
CURRENT_DEFAULT_TOOLCHAIN_VERSION = '2015'
@ -61,14 +57,6 @@ def SetEnvironmentAndGetRuntimeDllDirs():
os.environ['GYP_MSVS_OVERRIDE_PATH'] = toolchain
os.environ['GYP_MSVS_VERSION'] = version
# We need to make sure windows_sdk_path is set to the automated
# toolchain values in GYP_DEFINES, but don't want to override any
# otheroptions.express
# values there.
gyp_defines_dict = gyp.NameValueListToDict(gyp.ShlexEnv('GYP_DEFINES'))
gyp_defines_dict['windows_sdk_path'] = win_sdk
os.environ['GYP_DEFINES'] = ' '.join('%s=%s' % (k, pipes.quote(str(v)))
for k, v in gyp_defines_dict.iteritems())
os.environ['WINDOWSSDKDIR'] = win_sdk
os.environ['WDK_DIR'] = wdk
# Include the VS runtime in the PATH in case it's not machine-installed.

View file

@ -1,29 +0,0 @@
#!/usr/bin/env python
# Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
# for details. All rights reserved. Use of this source code is governed by a
# BSD-style license that can be found in the LICENSE file.
import os
import sys
# Change into the dart directory as we want the project to be rooted here.
runtime_src = os.path.join(os.path.dirname(sys.argv[0]), os.pardir)
gclient_src = os.path.join(runtime_src, os.pardir)
project_src = os.path.join(gclient_src, sys.argv[1])
os.chdir(project_src)
# Add gyp to the imports and if needed get it from the third_party location
# inside the standalone dart gclient checkout.
try:
import gyp
except ImportError, e:
sys.path.append(os.path.join(os.pardir, 'third_party', 'gyp', 'pylib'))
import gyp
if __name__ == '__main__':
args = ['--depth', '.']
args += ['dart-runtime.gyp']
# Generate the projects.
sys.exit(gyp.main(args))