Skip to content

Apple testbed fails to build when its path contains a space #162034

Open

Description

@fametrano

Bug report

The iOS testbed fails to build when it is cloned to a path that contains a space. Its "Process Python libraries" build phase runs source $PROJECT_DIR/Python.xcframework/build/utils.sh without quotes, so the shell splits the path at the space. The tvOS, visionOS and watchOS projects have the same line, and so does the iOS project on the 3.14 and 3.15 branches.

$ python Platforms/Apple/testbed clone --framework Python.xcframework "<dir>/with space/tb"
$ python "<dir>/with space/tb" run -- platform
...
<dir>/with space/tb/DerivedData/.../Script-607A66552B0F061D0010BFC8.sh: line 3: <dir>/with: No such file or directory
Command PhaseScriptExecution failed with a nonzero exit code
** TEST BUILD FAILED **

The same clone under <dir>/with-hyphen/tb builds and its test passes. This was on Xcode 27.2 with the iOS 27.2 simulator, using a 3.14.10 iOS XCframework.

The unquoted path is also glob-expanded. Run on its own with PROJECT_DIR=<dir>/run[x], the build phase sourced <dir>/runx/Python.xcframework/build/utils.sh, which existed next to it, instead of its own.

The example build phase in Doc/using/ios.rst and in the utils.sh header comment is unquoted too, and names the file build_utils.sh, which the XCframework does not contain.

CPython versions tested on:

CPython main branch

Operating systems tested on:

macOS

Linked PRs

Activity

  1. added
    type-bugAn unexpected behavior, bug, or error
    buildThe build process and cross-build
    on Nov 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    OS-iosbuildThe build process and cross-buildtype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions