aboutsummaryrefslogtreecommitdiff
path: root/build/ndk-build
diff options
context:
space:
mode:
authorDan Albert <danalbert@google.com>2019-09-24 14:27:32 -0700
committerDan Albert <danalbert@google.com>2019-09-24 14:27:32 -0700
commit6bbd53b4707abbbcf5bb4bd25d909b0da2b8285d (patch)
treed6e9d3d58caf5f4e8565c501a85d6821e69a1a81 /build/ndk-build
parent4bde918661a74fb9eb6f56de4ba5f5bb29d74684 (diff)
downloadndk-6bbd53b4707abbbcf5bb4bd25d909b0da2b8285d.tar.gz
Unset PYTHONPATH and PYTHONHOME in ndk-build.
ndk-build calls into our own shipped Python, and if the user has their own conflicting Python install referred to by PYTHONHOME or PYTHONPATH that can cause issues. Test: ./checkbuild.py Bug: https://github.com/android/ndk/issues/904 Bug: https://github.com/googlesamples/vulkan-basic-samples/issues/25 Change-Id: I1e0c3091e67c866e5e908c054fd2b5e45e80e58b
Diffstat (limited to 'build/ndk-build')
-rwxr-xr-xbuild/ndk-build6
1 files changed, 6 insertions, 0 deletions
diff --git a/build/ndk-build b/build/ndk-build
index 7d745190d..85d10e60d 100755
--- a/build/ndk-build
+++ b/build/ndk-build
@@ -41,6 +41,12 @@ PROGDIR=`dirname $0`
PROGDIR=`cd $PROGDIR && pwd -P`
ANDROID_NDK_ROOT=$PROGDIR/..
+# Unset PYTHONPATH and PYTHONHOME to prevent the user's environment from
+# affecting the Python that we invoke.
+# See https://github.com/googlesamples/vulkan-basic-samples/issues/25
+unset PYTHONHOME
+unset PYTHONPATH
+
# Check if absolute NDK path contain space
#
case $PROGDIR in