Skip to content

Commit fb2ea07

Browse files
committed
Merge branch 'main' into apple-platforms
2 parents d8f61f8 + 5684b3a commit fb2ea07

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

Makefile.pre.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2361,7 +2361,7 @@ testios:
23612361
$(PYTHON_FOR_BUILD) $(srcdir)/Platforms/Apple/testbed clone --framework $(PYTHONFRAMEWORKPREFIX) "$(XCFOLDER)"
23622362

23632363
# Run the testbed project
2364-
$(PYTHON_FOR_BUILD) "$(XCFOLDER)" run --verbose -- test -uall --single-process --rerun -W
2364+
$(PYTHON_FOR_BUILD) "$(XCFOLDER)" run --verbose -- test -uall --single-process --rerun -W --pythoninfo
23652365

23662366
# Like test, but using --slow-ci which enables all test resources and use
23672367
# longer timeout. Run an optional pybuildbot.identify script to include
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
The iOS XCframework build script now ensures libpython isn't included in
2+
installed app content, and is more robust in identifying standard library
3+
binary content that requires processing.

Platforms/Apple/testbed/Python.xcframework/build/utils.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,11 @@ install_stdlib() {
4242
# If the XCframework has a shared lib folder, then it's a full framework.
4343
# Copy both the common and slice-specific part of the lib directory.
4444
# Otherwise, it's a single-arch framework; use the "full" lib folder.
45+
# Don't include any libpython symlink; that can't be included at runtime
4546
if [ -d "$PROJECT_DIR/$PYTHON_XCFRAMEWORK_PATH/lib" ]; then
46-
rsync -au --delete "$PROJECT_DIR/$PYTHON_XCFRAMEWORK_PATH/lib/" "$CODESIGNING_FOLDER_PATH/python/lib/"
47-
rsync -au "$PROJECT_DIR/$PYTHON_XCFRAMEWORK_PATH/$SLICE_FOLDER/lib-$ARCHS/" "$CODESIGNING_FOLDER_PATH/python/lib/"
47+
rsync -au --delete "$PROJECT_DIR/$PYTHON_XCFRAMEWORK_PATH/lib/" "$CODESIGNING_FOLDER_PATH/python/lib/" --exclude 'libpython*.dylib'
48+
rsync -au "$PROJECT_DIR/$PYTHON_XCFRAMEWORK_PATH/$SLICE_FOLDER/lib-$ARCHS/" "$CODESIGNING_FOLDER_PATH/python/lib/" --exclude 'libpython*.dylib'
4849
else
49-
# A single-arch framework will have a libpython symlink; that can't be included at runtime
5050
rsync -au --delete "$PROJECT_DIR/$PYTHON_XCFRAMEWORK_PATH/$SLICE_FOLDER/lib/" "$CODESIGNING_FOLDER_PATH/python/lib/" --exclude 'libpython*.dylib'
5151
fi
5252
}
@@ -140,7 +140,7 @@ install_python() {
140140
shift
141141

142142
install_stdlib $PYTHON_XCFRAMEWORK_PATH
143-
PYTHON_VER=$(ls -1 "$CODESIGNING_FOLDER_PATH/python/lib")
143+
PYTHON_VER=$(ls -1 "$CODESIGNING_FOLDER_PATH/python/lib" | grep -E "^python3\.\d+$")
144144
echo "Install Python $PYTHON_VER standard library extension modules..."
145145
process_dylibs $PYTHON_XCFRAMEWORK_PATH python/lib/$PYTHON_VER/lib-dynload
146146

0 commit comments

Comments
 (0)