gh-71052: Change Android's sys.platform from "linux" to "android"

Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
This commit is contained in:
Malcolm Smith 2024-03-11 19:25:39 +00:00 committed by GitHub
parent 9f983e00ec
commit 872c0714fc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
24 changed files with 97 additions and 81 deletions

View file

@ -47,7 +47,8 @@ else:
COPY_BUFSIZE = 1024 * 1024 if _WINDOWS else 64 * 1024
# This should never be removed, see rationale in:
# https://bugs.python.org/issue43743#msg393429
_USE_CP_SENDFILE = hasattr(os, "sendfile") and sys.platform.startswith("linux")
_USE_CP_SENDFILE = (hasattr(os, "sendfile")
and sys.platform.startswith(("linux", "android")))
_HAS_FCOPYFILE = posix and hasattr(posix, "_fcopyfile") # macOS
# CMD defaults in Windows 10