aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-05-22 19:30:54 +0000
committerGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-05-22 19:30:54 +0000
commit738a9218b8283602c75f424f6a0abe5290cf9472 (patch)
tree602718f20c3026c58125bac5688abbbbc20e6991
parent6f4e473676ff5c32c06151f4f8451d62715d65d2 (diff)
If our gyp does not exist, use chromium's.
The previous version had faith that if the third_party folder existed, it must contain externals/gyp. A recent change added third_party (in git, as opposed to using DEPS), so now Android has third_party but not externals/gyp. Now check the full filepath. If it's not there, back up to chromium's version. Fixes Android canary bot. R=halcanary@google.com TBR=halcanary@google.com Author: scroggo@google.com Review URL: https://codereview.chromium.org/295103008 git-svn-id: http://skia.googlecode.com/svn/trunk@14855 2bbb7eff-a529-9590-31e7-b0007b416f81
-rw-r--r--platform_tools/android/gyp_gen/android_framework_gyp.py11
1 files changed, 5 insertions, 6 deletions
diff --git a/platform_tools/android/gyp_gen/android_framework_gyp.py b/platform_tools/android/gyp_gen/android_framework_gyp.py
index 67d391a883..b36bb25970 100644
--- a/platform_tools/android/gyp_gen/android_framework_gyp.py
+++ b/platform_tools/android/gyp_gen/android_framework_gyp.py
@@ -23,19 +23,18 @@ DIR_CONTENTS = os.listdir(SKIA_DIR)
assert 'gyp' in DIR_CONTENTS
# Directory within which we can find the gyp source.
-if 'third_party' in DIR_CONTENTS:
- GYP_SOURCE_DIR = os.path.join(SKIA_DIR, 'third_party', 'externals', 'gyp')
-else:
+gyp_source_dir = os.path.join(SKIA_DIR, 'third_party', 'externals', 'gyp')
+if not os.path.exists(gyp_source_dir):
# In an Android tree, there is no third_party/externals/gyp, which would
# require running gclient sync. Use chromium's instead.
- GYP_SOURCE_DIR = os.path.join(SKIA_DIR, os.pardir, 'chromium_org', 'tools',
+ gyp_source_dir = os.path.join(SKIA_DIR, os.pardir, 'chromium_org', 'tools',
'gyp')
-assert os.path.exists(GYP_SOURCE_DIR)
+assert os.path.exists(gyp_source_dir)
# Ensure we import our current gyp source's module, not any version
# pre-installed in your PYTHONPATH.
-sys.path.insert(0, os.path.join(GYP_SOURCE_DIR, 'pylib'))
+sys.path.insert(0, os.path.join(gyp_source_dir, 'pylib'))
import gyp