Skip to content

Commit 0abc9be

Browse files
committed
Improve NDK installation experience
1 parent 5270712 commit 0abc9be

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

Platforms/Android/__main__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ def android_env(host):
158158
f"PREFIX={prefix}; "
159159
f". {ENV_SCRIPT}; "
160160
f"export",
161-
check=True, shell=True, capture_output=True, encoding='utf-8',
161+
check=True, shell=True, stdout=subprocess.PIPE, encoding='utf-8',
162162
).stdout
163163

164164
env = {}

Platforms/Android/android-env.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
: "${PREFIX:-}" # Path in which to find required libraries
88

99

10-
# Print all messages on stderr so they're visible when running within build-wheel.
10+
# Print all messages on stderr so they're visible when stdout is captured.
1111
log() {
1212
echo "$1" >&2
1313
}
@@ -27,7 +27,7 @@ fail() {
2727
ndk_version=27.3.13750724
2828

2929
ndk=$ANDROID_HOME/ndk/$ndk_version
30-
if ! [ -e "$ndk" ]; then
30+
if ! [ -e "$ndk/package.xml" ]; then
3131
log "Installing NDK - this may take several minutes"
3232
yes | "$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager" "ndk;$ndk_version"
3333
fi

0 commit comments

Comments
 (0)