Skip to content

gh-162034: Quote the utils.sh path in the Apple testbed build phase - #162035

Merged
freakboy3742 merged 3 commits into
python:mainfrom
fametrano:ios-testbed-space-path-docs
Nov 16, 2026
Merged

freakboy3742 merged 3 commits into
python:mainfrom
fametrano:ios-testbed-space-path-docs

Conversation

@fametrano

@fametrano fametrano commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

The Apple testbed fails to build when its path contains a space, because the "Process Python libraries" build phase sources utils.sh through an unquoted $PROJECT_DIR. A *, ? or [ in the path is glob-expanded as well, so the phase can source another directory's utils.sh. This quotes that path in the iOS, tvOS, visionOS and watchOS testbed projects, and in the example in Doc/using/ios.rst and the utils.sh header, where it also replaces the nonexistent build_utils.sh with utils.sh.

With the change, an iOS testbed cloned under a path with a space builds and passes run -- platform on the iOS 27.2 simulator, and the build phase run with PROJECT_DIR=<dir>/run[x] sources its own utils.sh. The other three projects take the same one-line change; I had no simulator for them.

…hase

The "Process Python libraries" build phase sources utils.sh through an
unquoted $PROJECT_DIR. The build fails when the project path contains a
space, and a *, ? or [ in the path is glob-expanded, so the phase can
source another directory's utils.sh. Quote the path in the four testbed
projects.
The build phase example in Doc/using/ios.rst, and the one in the utils.sh
header comment, source an unquoted path to build_utils.sh. The helper is
named utils.sh. Quote the path and use the right file name.
@python-cla-bot

python-cla-bot Bot commented Nov 15, 2026 •

Copy link
Copy Markdown

All commit authors signed the Contributor License Agreement.

CLA signed

@read-the-docs-community

read-the-docs-community Bot commented Nov 15, 2026 •

Copy link
Copy Markdown

Documentation build overview

📚 cpython-previews | 🛠️ Build #35912825 | 📁 Comparing f1f155b against main (8750d38)

  🔍 Preview build  

2 files changed
± using/ios.html
± whatsnew/changelog.html

@hugovk

hugovk commented Nov 15, 2026

Copy link
Copy Markdown
Member

@fametrano Thanks for the PR, please sign the CLA: #162035 (comment)

@fametrano

Copy link
Copy Markdown
Contributor Author

@fametrano please sign the CLA: #162035 (comment)

done

@hugovk

hugovk commented Nov 15, 2026

Copy link
Copy Markdown
Member

Thanks!

And please could you sign the CLA again? :)

See https://devguide.python.org/getting-started/pull-request-lifecycle/#why-do-i-need-to-sign-the-cla-again which is about backports, but will be triggered here by merging in main.

Tip: no need to merge in main unless there's a merge conflict to resolve, or there's been a long time since the last run.

@fametrano

Copy link
Copy Markdown
Contributor Author

Got it, won't update the branch anymore and/or will sign again

@freakboy3742 freakboy3742 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the report and PR!

@freakboy3742 freakboy3742 added needs backport to 3.14 bugs and security fixes needs backport to 3.15 bugs and security fixes labels Nov 16, 2026
@freakboy3742
freakboy3742 merged commit ea678b2 into python:main Nov 16, 2026
62 checks passed
@miss-islington-app

Copy link
Copy Markdown

Thanks @fametrano for the PR, and @freakboy3742 for merging it 🌮🎉.. I'm working now to backport this PR to: 3.14, 3.15.
🐍🍒⛏🤖

@miss-islington-app

Copy link
Copy Markdown

Sorry, @fametrano and @freakboy3742, I could not cleanly backport this to 3.15 due to a conflict.

Please backport manually with cherry_picker, see the devguide for more information.

cherry_picker ea678b2e08b57e4c23fdd993e168d3642d9ba7bb 3.15

@miss-islington-app

Copy link
Copy Markdown

Sorry, @fametrano and @freakboy3742, I could not cleanly backport this to 3.14 due to a conflict.

Please backport manually with cherry_picker, see the devguide for more information.

cherry_picker ea678b2e08b57e4c23fdd993e168d3642d9ba7bb 3.14

@bedevere-app

bedevere-app Bot commented Nov 16, 2026

Copy link
Copy Markdown

GH-162089 is a backport of this pull request to the 3.15 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.15 bugs and security fixes label Nov 16, 2026
@bedevere-app

bedevere-app Bot commented Nov 16, 2026

Copy link
Copy Markdown

GH-162090 is a backport of this pull request to the 3.14 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.14 bugs and security fixes label Nov 16, 2026
hugovk pushed a commit that referenced this pull request Nov 16, 2026
…phase (GH-162035) (#162090)

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 ea678b2)

Co-authored-by: Ferdinando Ametrano <fametrano@users.noreply.github.com>
hugovk pushed a commit that referenced this pull request Nov 16, 2026
…phase (GH-162035) (#162089)

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 ea678b2)

Co-authored-by: Ferdinando Ametrano <fametrano@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants