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
This commit is contained in:
parent
6f4e473676
commit
738a9218b8
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user