Skip to content

Commit ea678b2

Browse files
authored
gh-162034: Quote the utils.sh path in the Apple testbed build phase (#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.
1 parent 7c59816 commit ea678b2

7 files changed

Lines changed: 8 additions & 6 deletions

File tree

‎Doc/using/ios.rst‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ To add Python to an iOS Xcode project:
226226
.. code-block:: bash
227227
228228
set -e
229-
source $PROJECT_DIR/Python.xcframework/build/build_utils.sh
229+
source "$PROJECT_DIR/Python.xcframework/build/utils.sh"
230230
install_python Python.xcframework app
231231
232232
If you have placed your XCframework somewhere other than the root of your
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
The Apple testbed projects now build when the path of the project contains a
2+
space.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
# * There is an `app_packages` folder that contains installed Python packages.
1515
# -----
1616
# set -e
17-
# source $PROJECT_DIR/Python.xcframework/build/build_utils.sh
17+
# source "$PROJECT_DIR/Python.xcframework/build/utils.sh"
1818
# install_python Python.xcframework app app_packages
1919
# -----
2020

‎Platforms/Apple/testbed/iOSTestbed.xcodeproj/project.pbxproj‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@
250250
);
251251
runOnlyForDeploymentPostprocessing = 0;
252252
shellPath = /bin/sh;
253-
shellScript = "set -e\nsource $PROJECT_DIR/Python{{abiflags}}.xcframework/build/utils.sh\ninstall_python Python{{abiflags}}.xcframework app app_packages\n";
253+
shellScript = "set -e\nsource \"$PROJECT_DIR/Python{{abiflags}}.xcframework/build/utils.sh\"\ninstall_python Python{{abiflags}}.xcframework app app_packages\n";
254254
showEnvVarsInLog = 0;
255255
};
256256
/* End PBXShellScriptBuildPhase section */

‎Platforms/Apple/testbed/tvOSTestbed.xcodeproj/project.pbxproj‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@
236236
);
237237
runOnlyForDeploymentPostprocessing = 0;
238238
shellPath = /bin/sh;
239-
shellScript = "set -e\n\nsource $PROJECT_DIR/Python{{abiflags}}.xcframework/build/utils.sh\n\ninstall_python Python{{abiflags}}.xcframework app app_packages\n";
239+
shellScript = "set -e\n\nsource \"$PROJECT_DIR/Python{{abiflags}}.xcframework/build/utils.sh\"\n\ninstall_python Python{{abiflags}}.xcframework app app_packages\n";
240240
showEnvVarsInLog = 0;
241241
};
242242
/* End PBXShellScriptBuildPhase section */

‎Platforms/Apple/testbed/visionOSTestbed.xcodeproj/project.pbxproj‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@
250250
);
251251
runOnlyForDeploymentPostprocessing = 0;
252252
shellPath = /bin/sh;
253-
shellScript = "set -e\n\nsource $PROJECT_DIR/Python{{abiflags}}.xcframework/build/utils.sh\n\ninstall_python Python{{abiflags}}.xcframework app app_packages\n";
253+
shellScript = "set -e\n\nsource \"$PROJECT_DIR/Python{{abiflags}}.xcframework/build/utils.sh\"\n\ninstall_python Python{{abiflags}}.xcframework app app_packages\n";
254254
showEnvVarsInLog = 0;
255255
};
256256
/* End PBXShellScriptBuildPhase section */

‎Platforms/Apple/testbed/watchOSTestbed.xcodeproj/project.pbxproj‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@
236236
);
237237
runOnlyForDeploymentPostprocessing = 0;
238238
shellPath = /bin/sh;
239-
shellScript = "set -e\n\nsource $PROJECT_DIR/Python{{abiflags}}.xcframework/build/utils.sh\n\ninstall_python Python{{abiflags}}.xcframework app app_packages\n";
239+
shellScript = "set -e\n\nsource \"$PROJECT_DIR/Python{{abiflags}}.xcframework/build/utils.sh\"\n\ninstall_python Python{{abiflags}}.xcframework app app_packages\n";
240240
showEnvVarsInLog = 0;
241241
};
242242
/* End PBXShellScriptBuildPhase section */

0 commit comments

Comments
 (0)