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

Function setup_testbed

Android/android.py:376–393  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

374# the Gradle wrapper is not included in the CPython repository. Instead, we
375# extract it from the Gradle GitHub repository.
376def setup_testbed():
377 paths = ["gradlew", "gradlew.bat", "gradle/wrapper/gradle-wrapper.jar"]
378 if all((TESTBED_DIR / path).exists() for path in paths):
379 return
380
381 # The wrapper version isn't important, as any version of the wrapper can
382 # download any version of Gradle. The Gradle version actually used for the
383 # build is specified in testbed/gradle/wrapper/gradle-wrapper.properties.
384 version = "8.9.0"
385
386 for path in paths:
387 out_path = TESTBED_DIR / path
388 out_path.parent.mkdir(exist_ok=True)
389 download(
390 f"https://raw.githubusercontent.com/gradle/gradle/v{version}/{path}",
391 out_path.parent,
392 )
393 os.chmod(out_path, 0o755)
394
395
396# run_testbed will build the app automatically, but it's useful to have this as

Callers 2

build_testbedFunction · 0.85
run_testbedFunction · 0.85

Calls 4

downloadFunction · 0.70
existsMethod · 0.45
mkdirMethod · 0.45
chmodMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…