Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(116)

Unified Diff: platform_tools/android/gyp_gen/android_framework_gyp.py

Issue 295103008: If our gyp does not exist, use chromium's. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: platform_tools/android/gyp_gen/android_framework_gyp.py
diff --git a/platform_tools/android/gyp_gen/android_framework_gyp.py b/platform_tools/android/gyp_gen/android_framework_gyp.py
index 67d391a8831f350829f35ed34738e471097f7537..b36bb259702be76076639f0fee49969796b225a9 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698