Skip to content

Commit c0901ee

Browse files
committed
Windows: use --profile to match abi3 wheel; Android: log extractPythonDist
Windows: Flutter's --debug config makes serious_python_windows bundle the Debug python3XY_d.dll while the cibuildwheel-built abi3 dart_bridge wheel imports python3.dll, which forwards to the Release python3XY.dll. Use --profile (Release Python) on the integration test so the embedded interpreter matches the wheel's link target. Android: extractPythonDist_<abi> still ends without libpython3.so on disk. Print the tar path, staging dir, and final tree contents so we can see whether the task is even running and what include patterns actually match.
1 parent 4d07051 commit c0901ee

2 files changed

Lines changed: 24 additions & 1 deletion

File tree

.github/workflows/test-bridge-build.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -395,9 +395,16 @@ jobs:
395395
396396
- name: Package + run integration test
397397
working-directory: "src/serious_python_bridge/example"
398+
# --profile (vs default --debug) is essential on Windows: serious_python_
399+
# windows links/bundles the Debug python3XY_d.dll suffix only on Debug
400+
# configs, and the cibuildwheel-built abi3 wheel's python3.dll stub
401+
# forwards to the Release python3XY.dll. With --debug we'd need both
402+
# python3XY.dll AND python3XY_d.dll bundled, plus python3.dll AND
403+
# python3_d.dll — fragile. Profile uses Release Python on the embed
404+
# side which matches the abi3 wheel.
398405
run: |
399406
dart run serious_python:main package app/src --platform Windows --python-version ${{ matrix.python_version }} --requirements ${{ steps.wheel.outputs.path }}
400-
flutter test integration_test -d windows
407+
flutter test integration_test -d windows --profile
401408
402409
- name: Diagnostics on failure
403410
if: failure()

src/serious_python_bridge/android/build.gradle

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,22 @@ android.defaultConfig.ndk.abiFilters.each { abi ->
112112
fcd.path = fcd.path.replaceAll("^install/android/[^/]+/python-[^/]+/", "")
113113
}
114114
includeEmptyDirs = false
115+
116+
doFirst {
117+
println "[serious_python_bridge] extractPythonDist_${abi}: staging to ${stagingDir}"
118+
println "[serious_python_bridge] tar: ${archiveCachePath} (exists=${archiveCachePath.exists()})"
119+
}
120+
doLast {
121+
def libpython = new File(stagingDir, "lib/libpython3.so")
122+
def header = new File(stagingDir, "include/python${python_version}/Python.h")
123+
println "[serious_python_bridge] extractPythonDist_${abi} done"
124+
println "[serious_python_bridge] ${libpython}: exists=${libpython.exists()}"
125+
println "[serious_python_bridge] ${header}: exists=${header.exists()}"
126+
if (!libpython.exists() || !header.exists()) {
127+
println "[serious_python_bridge] STAGED CONTENTS:"
128+
stagingDir.eachFileRecurse { f -> println " ${f}" }
129+
}
130+
}
115131
}
116132

117133
prepareTasks.add("extractPythonDist_${abi}")

0 commit comments

Comments
 (0)