Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Android/android-env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
: "${PREFIX:-}" # Path in which to find required libraries


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

ndk=$ANDROID_HOME/ndk/$ndk_version
if ! [ -e "$ndk" ]; then
if ! [ -e "$ndk/package.xml" ]; then
log "Installing NDK - this may take several minutes"
yes | "$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager" "ndk;$ndk_version"
fi
Expand Down
5 changes: 3 additions & 2 deletions Android/android.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ def android_env(host):
f"PREFIX={prefix}; "
f". {ENV_SCRIPT}; "
f"export",
check=True, shell=True, capture_output=True, encoding='utf-8',
check=True, shell=True, stdout=subprocess.PIPE, encoding='utf-8',
).stdout

env = {}
Expand Down Expand Up @@ -621,7 +621,8 @@ async def read_int(size):
except ValueError:
priority = LogPriority.UNKNOWN

payload_fields = (await read_bytes(payload_len - 1)).split(b"\0")
payload = await read_bytes(payload_len - 1)
payload_fields = payload.split(b"\0")
if len(payload_fields) < 2:
raise ValueError(
f"payload {payload!r} does not contain at least 2 "
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,11 @@ class PythonTestRunner(val context: Context) {
* @param args Python command-line, encoded as JSON.
* @return The Python exit status: zero on success, nonzero on failure. */
fun run(args: String) : Int {
// We leave argument 0 as an empty string, which is a placeholder for the
// executable name in embedded mode.
// Argument 0 is a placeholder for the executable name in embedded mode.
val argsJsonArray = JSONArray(args)
val argsStringArray = Array<String>(argsJsonArray.length() + 1) { it -> ""}
for (i in 0..<argsJsonArray.length()) {
argsStringArray[i + 1] = argsJsonArray.getString(i)
val argsStringArray = Array<String>(argsJsonArray.length() + 1) { i ->
if (i == 0) ""
else argsJsonArray.getString(i - 1)
}

// Python needs this variable to help it find the temporary directory,
Expand Down
4 changes: 2 additions & 2 deletions Doc/library/os.rst
Original file line number Diff line number Diff line change
Expand Up @@ -769,9 +769,9 @@ process and user.
Returns information identifying the current operating system.
The return value is a :class:`uname_result`.

On macOS, iOS and Android, this returns the *kernel* name and version (i.e.,
On macOS, iOS and Android, this returns the *kernel* name and release (i.e.,
``'Darwin'`` on macOS and iOS; ``'Linux'`` on Android). :func:`platform.uname`
can be used to get the user-facing operating system name and version on iOS and
can be used to get the user-facing operating system name and release on iOS and
Android.

.. seealso::
Expand Down
5 changes: 2 additions & 3 deletions Doc/library/platform.rst
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,8 @@ Cross platform
Returns the system's release, e.g. ``'2.2.0'`` or ``'NT'``. An empty string is
returned if the value cannot be determined.

On iOS and Android, this is the user-facing OS release. To obtain the
Darwin or Linux kernel release, use :func:`os.uname`.

.. function:: system()

Expand All @@ -166,9 +168,6 @@ Cross platform
Returns the system's release version, e.g. ``'#3 on degas'``. An empty string is
returned if the value cannot be determined.

On iOS and Android, this is the user-facing OS version. To obtain the
Darwin or Linux kernel version, use :func:`os.uname`.

.. function:: uname()

Fairly portable uname interface. Returns a :func:`~collections.namedtuple`
Expand Down
Loading