mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
[3.13] gh-116622: Fix testPyObjectPrintOSError on Android (GH-122487) (#122490)
gh-116622: Fix testPyObjectPrintOSError on Android (GH-122487)
Adds extra handling for way BSD/Android return errors from calls to fwrite.
(cherry picked from commit 82db572813
)
Co-authored-by: Malcolm Smith <smith@chaquo.com>
This commit is contained in:
parent
a21317f07b
commit
5212624c42
4 changed files with 39 additions and 9 deletions
|
@ -7,10 +7,17 @@ plugins {
|
|||
|
||||
val PYTHON_DIR = File(projectDir, "../../..").canonicalPath
|
||||
val PYTHON_CROSS_DIR = "$PYTHON_DIR/cross-build"
|
||||
|
||||
val ABIS = mapOf(
|
||||
"arm64-v8a" to "aarch64-linux-android",
|
||||
"x86_64" to "x86_64-linux-android",
|
||||
)
|
||||
).filter { File("$PYTHON_CROSS_DIR/${it.value}").exists() }
|
||||
if (ABIS.isEmpty()) {
|
||||
throw GradleException(
|
||||
"No Android ABIs found in $PYTHON_CROSS_DIR: see Android/README.md " +
|
||||
"for building instructions."
|
||||
)
|
||||
}
|
||||
|
||||
val PYTHON_VERSION = File("$PYTHON_DIR/Include/patchlevel.h").useLines {
|
||||
for (line in it) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue