From 2549ef3d5eab8df8edb83929f91d40a81446be98 Mon Sep 17 00:00:00 2001 From: Ferdinando Ametrano Date: Mon, 16 Nov 2026 09:19:28 +0100 Subject: [PATCH] [3.14] gh-162034: Quote the utils.sh path in the Apple testbed build phase (GH-162035) Modifies the iOS testbed to ensure that the path to the `utils.sh` script is quoted so that spaces in the path don't prevent the script from operating. (cherry picked from commit ea678b2e08b57e4c23fdd993e168d3642d9ba7bb) Co-authored-by: Ferdinando Ametrano --- Apple/testbed/Python.xcframework/build/utils.sh | 2 +- Apple/testbed/iOSTestbed.xcodeproj/project.pbxproj | 2 +- Doc/using/ios.rst | 2 +- .../next/Tests/2026-11-15-09-43-15.gh-issue-162034.egx5QV.rst | 2 ++ 4 files changed, 5 insertions(+), 3 deletions(-) create mode 100644 Misc/NEWS.d/next/Tests/2026-11-15-09-43-15.gh-issue-162034.egx5QV.rst diff --git a/Apple/testbed/Python.xcframework/build/utils.sh b/Apple/testbed/Python.xcframework/build/utils.sh index e54471f68b7cb2c..7b905640cfa192a 100755 --- a/Apple/testbed/Python.xcframework/build/utils.sh +++ b/Apple/testbed/Python.xcframework/build/utils.sh @@ -14,7 +14,7 @@ # * There is an `app_packages` folder that contains installed Python packages. # ----- # set -e -# source $PROJECT_DIR/Python.xcframework/build/build_utils.sh +# source "$PROJECT_DIR/Python.xcframework/build/utils.sh" # install_python Python.xcframework app app_packages # ----- diff --git a/Apple/testbed/iOSTestbed.xcodeproj/project.pbxproj b/Apple/testbed/iOSTestbed.xcodeproj/project.pbxproj index a0dd6851dc103da..b15a72f3ad92bf4 100644 --- a/Apple/testbed/iOSTestbed.xcodeproj/project.pbxproj +++ b/Apple/testbed/iOSTestbed.xcodeproj/project.pbxproj @@ -250,7 +250,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "set -e\nsource $PROJECT_DIR/Python.xcframework/build/utils.sh\ninstall_python Python.xcframework app app_packages\n"; + shellScript = "set -e\nsource \"$PROJECT_DIR/Python.xcframework/build/utils.sh\"\ninstall_python Python.xcframework app app_packages\n"; showEnvVarsInLog = 0; }; /* End PBXShellScriptBuildPhase section */ diff --git a/Doc/using/ios.rst b/Doc/using/ios.rst index 18fa0f6d341c652..c2332d1bafd8484 100644 --- a/Doc/using/ios.rst +++ b/Doc/using/ios.rst @@ -219,7 +219,7 @@ To add Python to an iOS Xcode project: .. code-block:: bash set -e - source $PROJECT_DIR/Python.xcframework/build/build_utils.sh + source "$PROJECT_DIR/Python.xcframework/build/utils.sh" install_python Python.xcframework app If you have placed your XCframework somewhere other than the root of your diff --git a/Misc/NEWS.d/next/Tests/2026-11-15-09-43-15.gh-issue-162034.egx5QV.rst b/Misc/NEWS.d/next/Tests/2026-11-15-09-43-15.gh-issue-162034.egx5QV.rst new file mode 100644 index 000000000000000..1b7d2c4ad5f27c6 --- /dev/null +++ b/Misc/NEWS.d/next/Tests/2026-11-15-09-43-15.gh-issue-162034.egx5QV.rst @@ -0,0 +1,2 @@ +The Apple testbed projects now build when the path of the project contains a +space.