Lines Matching +full:configure +full:- +full:openssl +full:- +full:no +full:- +full:verbose
26 CROSS_BUILD_DIR = CHECKOUT / "cross-build"
29 DECODE_ARGS = ("UTF-8", "backslashreplace")
38 f"{android_home}/platform-tools/adb"
51 # Path.glob doesn't accept non-relative patterns.
69 f"`configure` subcommand of {SCRIPT_NAME}.")
82 env_script = ANDROID_DIR / "android-env.sh"
84 f"set -eu; "
96 "^(declare -x |export )?(\\w+)=['\"]?(.*?)['\"]?$", line
104 raise ValueError(f"Found no variables in {env_script.name} output:\n"
128 command = [relpath(CHECKOUT / "configure")]
136 run(["make", "-j", str(os.cpu_count())])
140 deps_url = "https://github.com/beeware/cpython-android-source-deps/releases/download"
141 for name_ver in ["bzip2-1.0.8-2", "libffi-3.4.4-3", "openssl-3.0.15-4",
142 "sqlite-3.45.3-3", "xz-5.4.6-1"]:
143 filename = f"{name_ver}-{host}.tar.gz"
145 run(["tar", "-xf", filename])
151 run(["curl", "-Lf", "-o", out_path, url])
169 # Basic cross-compiling configuration
170 relpath(CHECKOUT / "configure"),
171 f"--host={context.host}",
172 f"--build={sysconfig.get_config_var('BUILD_GNU_TYPE')}",
173 f"--with-build-python={build_python_path()}",
174 "--without-ensurepip",
177 "--enable-shared",
178 "--without-static-libpython",
180 # Dependent libraries. The others are found using pkg-config: see
181 # android-env.sh.
182 f"--with-openssl={prefix_dir}",
191 # The CFLAGS and LDFLAGS set in android-env include the prefix dir, so
201 run(["make", "-j", str(os.cpu_count())], host=context.host)
218 "cmdline-tools/latest/bin/sdkmanager"
223 # hasn't been accepted, so pre-accept all licenses.
225 "android-sdk-arm-dbt-license", "android-sdk-license"
227 run([sdkmanager, "--licenses"], text=True, input="y\n" * 100)
232 run([sdkmanager, "platform-tools"])
240 "gradlew", "gradlew.bat", "gradle/wrapper/gradle-wrapper.jar",
255 f"https://services.gradle.org/distributions/gradle-{ver_short}-bin.zip",
257 outer_jar = f"gradle-{ver_short}/lib/plugins/gradle-wrapper-{ver_short}.jar"
258 run(["unzip", "-d", temp_dir, bin_zip, outer_jar])
259 run(["unzip", "-o", "-d", f"{TESTBED_DIR}/gradle/wrapper",
260 f"{temp_dir}/{outer_jar}", "gradle-wrapper.jar"])
269 [gradlew, "--console", "plain", "packageDebug", "packageDebugAndroidTest"],
285 # that no matter what happens, they can always be cancelled from another task,
303 f" - sending SIGKILL"
327 # serials of the form "emulator-5678".
353 print("Waiting for managed device - this may take several minutes")
373 # We're more likely to miss the PID because it's shorter-lived, so there's a
374 # workaround in PythonSuite.kt to stop it being *too* short-lived.
376 print("Waiting for app to start - this may take several minutes")
383 adb, "-s", serial, "shell", "pidof", "-s", APP_ID
386 # If the app isn't running yet, pidof gives no output. So if there
395 # Some older devices (e.g. Nexus 4) return zero even when no process
401 # Loop fairly rapidly to avoid missing a short-lived process.
407 # images. This will happen during find_device in --managed mode, or find_pid
408 # in --connected mode.
413 # `--pid` requires API level 24 or higher.
414 args = [adb, "-s", serial, "logcat", "--pid", pid, "--format", "tag"]
420 if match := re.fullmatch(r"([A-Z])/(.*)", line, re.DOTALL):
424 # subsequent line of a multi-line message. Python won't produce
428 # Exclude high-volume messages which are rarely useful.
429 if context.verbose < 2 and "from python test_syslog" in message:
432 # Put high-level messages on stderr so they're highlighted in the
450 if context.verbose:
451 # Non-Python messages add a lot of noise, but they may
458 # happens in --managed mode, some versions of adb return non-zero.
467 run([adb, "-s", serial, "shell", "am", "force-stop", APP_ID], log=False)
479 gradlew, "--console", "plain", f"{task_prefix}DebugAndroidTest",
480 "-Pandroid.testInstrumentationRunnerArguments.pythonArgs="
491 # it's worth showing those messages even in non-verbose mode.
492 if context.verbose or line.startswith('Preparing "Install'):
504 # user probably wants to see the Gradle output even in non-verbose mode.
525 # unnecessary in --managed mode, because Gradle creates a new emulator
554 configure_build = subcommands.add_parser("configure-build",
555 help="Run `configure` for the "
557 make_build = subcommands.add_parser("make-build",
559 configure_host = subcommands.add_parser("configure-host",
560 help="Run `configure` for Android")
561 make_host = subcommands.add_parser("make-host",
564 "clean", help="Delete the cross-build directory")
568 "--clean", action="store_true", default=False, dest="clean",
573 choices=["aarch64-linux-android", "x86_64-linux-android"],
577 help="Extra arguments to pass to `configure`")
580 "build-testbed", help="Build the testbed app")
584 "-v", "--verbose", action="count", default=0,
585 help="Show Gradle output, and non-Python logcat messages. "
586 "Use twice to include high-volume messages which are rarely useful.")
589 "--connected", metavar="SERIAL", help="Run on a connected device. "
592 "--managed", metavar="NAME", help="Run on a Gradle-managed device. "
595 "args", nargs="*", help=f"Arguments for `python -m test`. "
596 f"Separate them from {SCRIPT_NAME}'s own arguments with `--`.")
611 dispatch = {"configure-build": configure_build_python,
612 "make-build": make_build_python,
613 "configure-host": configure_host_python,
614 "make-host": make_host_python,
617 "build-testbed": build_testbed,