aboutsummaryrefslogtreecommitdiff
path: root/build/android/gyp/util/build_utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'build/android/gyp/util/build_utils.py')
-rw-r--r--build/android/gyp/util/build_utils.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/build/android/gyp/util/build_utils.py b/build/android/gyp/util/build_utils.py
index 7b2f48d..abd2dfc 100644
--- a/build/android/gyp/util/build_utils.py
+++ b/build/android/gyp/util/build_utils.py
@@ -20,7 +20,13 @@ import zipfile
# Some clients do not add //build/android/gyp to PYTHONPATH.
import md5_check # pylint: disable=relative-import
-sys.path.append(os.path.join(os.path.dirname(__file__), os.pardir, os.pardir))
+# pylib conflicts with mojo/public/tools/bindings/pylib. Prioritize
+# build/android/pylib.
+# PYTHONPATH wouldn't help in this case, because soong put source files under
+# temp directory for each build, so the abspath is unknown until the
+# execution.
+# sys.path.append(os.path.join(os.path.dirname(__file__), os.pardir, os.pardir))
+sys.path.insert(0, os.path.join(os.path.dirname(__file__), os.pardir, os.pardir))
from pylib.constants import host_paths
sys.path.append(os.path.join(os.path.dirname(__file__),
@@ -581,4 +587,3 @@ def CallAndWriteDepfileIfStale(function, options, record_path=None,
output_paths=output_paths,
force=force,
pass_changes=True)
-