MCPcopy Index your code
hub / github.com/python/cpython / setup_sdk

Function setup_sdk

Android/android.py:349–370  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

347
348
349def setup_sdk():
350 sdkmanager = android_home / (
351 "cmdline-tools/latest/bin/sdkmanager"
352 + (".bat" if os.name == "nt" else "")
353 )
354
355 # Gradle will fail if it needs to install an SDK package whose license
356 # hasn't been accepted, so pre-accept all licenses.
357 if not all((android_home / "licenses" / path).exists() for path in [
358 "android-sdk-arm-dbt-license", "android-sdk-license"
359 ]):
360 run(
361 [sdkmanager, "--licenses"],
362 text=True,
363 capture_output=True,
364 input="y\n" * 100,
365 )
366
367 # Gradle may install this automatically, but we can't rely on that because
368 # we need to run adb within the logcat task.
369 if not adb.exists():
370 run([sdkmanager, "platform-tools"])
371
372
373# To avoid distributing compiled artifacts without corresponding source code,

Callers 2

build_testbedFunction · 0.85
run_testbedFunction · 0.85

Calls 2

runFunction · 0.70
existsMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…