From: commit-bot@chromium.org Date: Tue, 29 Apr 2014 00:39:45 +0000 (+0000) Subject: Explicitly include gyp_gen/android_framework_gyp. X-Git-Tag: accepted/tizen/5.0/unified/20181102.025319~8034 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a3987574c8fe9387ae8cb534d4f5248608b85b0e;p=platform%2Fupstream%2FlibSkiaSharp.git Explicitly include gyp_gen/android_framework_gyp. Add __init__.py to gyp_gen and explicitly include android_framework_gyp from there. Fixes a bug where after moving that file, python was looking for it in its old location, where there was a compiled version of the file. BUG=skia:2468 R=epoger@google.com Author: scroggo@google.com Review URL: https://codereview.chromium.org/251903003 git-svn-id: http://skia.googlecode.com/svn/trunk@14427 2bbb7eff-a529-9590-31e7-b0007b416f81 --- diff --git a/platform_tools/android/bin/gyp_to_android.py b/platform_tools/android/bin/gyp_to_android.py index f43d597..e885399 100755 --- a/platform_tools/android/bin/gyp_to_android.py +++ b/platform_tools/android/bin/gyp_to_android.py @@ -21,15 +21,15 @@ SKIA_DIR = os.path.normpath(os.path.join(SCRIPT_DIR, os.pardir, os.pardir, os.pardir)) # Find the directory with our helper files, and add it to the path. -GYP_GEN_DIR = os.path.join(SKIA_DIR, 'platform_tools', 'android', 'gyp_gen') -sys.path.append(GYP_GEN_DIR) - -import android_framework_gyp -import gypd_parser -import generate_user_config -import makefile_writer -import tool_makefile_writer -import vars_dict_lib +ANDROID_TOOLS = os.path.join(SKIA_DIR, 'platform_tools', 'android') +sys.path.append(ANDROID_TOOLS) + +import gyp_gen.android_framework_gyp as android_framework_gyp +import gyp_gen.gypd_parser as gypd_parser +import gyp_gen.generate_user_config as generate_user_config +import gyp_gen.makefile_writer as makefile_writer +import gyp_gen.tool_makefile_writer as tool_makefile_writer +import gyp_gen.vars_dict_lib as vars_dict_lib # Folder containing all gyp files and generated gypd files. GYP_FOLDER = 'gyp' diff --git a/platform_tools/android/gyp_gen/__init__.py b/platform_tools/android/gyp_gen/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/platform_tools/android/tests/android_framework_gyp_tests.py b/platform_tools/android/tests/android_framework_gyp_tests.py index 0b52c6b..085123f 100644 --- a/platform_tools/android/tests/android_framework_gyp_tests.py +++ b/platform_tools/android/tests/android_framework_gyp_tests.py @@ -16,10 +16,9 @@ import tempfile import test_variables import unittest -# Path to android_framework_gyp -sys.path.append(test_variables.GYP_GEN_DIR) +sys.path.append(test_variables.ANDROID_DIR) -import android_framework_gyp +import gyp_gen.android_framework_gyp GYPD_SUFFIX = ".gypd" GYP_SUFFIX = ".gyp" @@ -61,7 +60,7 @@ class CleanGypdTest(unittest.TestCase): def test_clean(self): """Test that clean_gypd_files() deletes .gypd files, and leaves others. """ - android_framework_gyp.clean_gypd_files(self.__tmp_dir) + gyp_gen.android_framework_gyp.clean_gypd_files(self.__tmp_dir) for i in range(self.__num_files): self.assert_file_exists('%s%s' % (str(i), GYPI_SUFFIX)) self.assert_file_exists('%s%s' % (str(i), GYP_SUFFIX))