From 0919246739468b3f243da3420852fb62f1c99301 Mon Sep 17 00:00:00 2001 From: Ferdinando Ametrano Date: Mon, 16 Nov 2026 09:19:28 +0100 Subject: [PATCH] [3.15] 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 --- Doc/using/ios.rst | 2 +- .../next/Tests/2026-11-15-09-43-15.gh-issue-162034.egx5QV.rst | 2 ++ Platforms/Apple/testbed/Python.xcframework/build/utils.sh | 2 +- Platforms/Apple/testbed/iOSTestbed.xcodeproj/project.pbxproj | 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/Doc/using/ios.rst b/Doc/using/ios.rst index a7ca5a35053df5..f2e5bfc1a8878f 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 00000000000000..1b7d2c4ad5f27c --- /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. diff --git a/Platforms/Apple/testbed/Python.xcframework/build/utils.sh b/Platforms/Apple/testbed/Python.xcframework/build/utils.sh index e54471f68b7cb2..7b905640cfa192 100755 --- a/Platforms/Apple/testbed/Python.xcframework/build/utils.sh +++ b/Platforms/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/Platforms/Apple/testbed/iOSTestbed.xcodeproj/project.pbxproj b/Platforms/Apple/testbed/iOSTestbed.xcodeproj/project.pbxproj index a0dd6851dc103d..b15a72f3ad92bf 100644 --- a/Platforms/Apple/testbed/iOSTestbed.xcodeproj/project.pbxproj +++ b/Platforms/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 */