KEMBAR78
gh-135966: Modify iOS testbed to make app_packages a site directory by freakboy3742 · Pull Request #135967 · python/cpython · GitHub
Skip to content

Conversation

@freakboy3742
Copy link
Contributor

@freakboy3742 freakboy3742 commented Jun 26, 2025

Modifies the startup of the iOS testbed so that the app_packages folder is treated as a site directory.

This ensures that .pth files that are installed by packaged (such as the setuptools "distutils_hack") will not be processed.

This surfaced during testing of an iOS patch for Pillow, which uses pyroma; pyroma depends on distutils; but because the .pth file installed by setuptools isn't processed, distutils can't be imported, and so neither can pyroma.

Also documents this as a likely integration requirement for anyone embedding CPython on iOS.


📚 Documentation preview 📚: https://cpython-previews--135967.org.readthedocs.build/

@freakboy3742 freakboy3742 requested a review from ned-deily June 26, 2025 07:23
@freakboy3742 freakboy3742 added needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes labels Jun 26, 2025
@freakboy3742
Copy link
Contributor Author

!buildbot iOS

@bedevere-bot
Copy link

🤖 New build scheduled with the buildbot fleet by @freakboy3742 for commit 1baae68 🤖

Results will be shown at:

https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F135967%2Fmerge

The command will test the builders whose names match following regular expression: iOS

The builders matched are:

  • iOS ARM64 Simulator PR

Copy link
Member

@ned-deily ned-deily left a comment

Choose a reason for hiding this comment

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

Looks reasonable to me

@freakboy3742 freakboy3742 merged commit b38810b into python:main Jun 27, 2025
83 of 85 checks passed
@freakboy3742 freakboy3742 deleted the ios-testbed-site branch June 27, 2025 04:46
@miss-islington-app
Copy link

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

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jun 27, 2025
…tory (pythonGH-135967)

The iOS testbed now treats the app_packages folder as a site folder. This ensures it is
on the path, but also ensures any .pth files are processed on app startup.
(cherry picked from commit b38810b)

Co-authored-by: Russell Keith-Magee <russell@keith-magee.com>
@miss-islington-app
Copy link

Sorry, @freakboy3742, I could not cleanly backport this to 3.13 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker b38810bab76c11ea09260a817b3354aebc2af580 3.13

@bedevere-app
Copy link

bedevere-app bot commented Jun 27, 2025

GH-136012 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 Jun 27, 2025
freakboy3742 added a commit to freakboy3742/cpython that referenced this pull request Jun 27, 2025
…e directory (pythonGH-135967)

The iOS testbed now treats the app_packages folder as a site folder. This ensures it is
on the path, but also ensures any .pth files are processed on app startup.
(cherry picked from commit b38810b)

Co-authored-by: Russell Keith-Magee <russell@keith-magee.com>
@bedevere-app
Copy link

bedevere-app bot commented Jun 27, 2025

GH-136013 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.13 bugs and security fixes label Jun 27, 2025
freakboy3742 added a commit that referenced this pull request Jun 27, 2025
…ctory (GH-135967) (#136012)

The iOS testbed now treats the app_packages folder as a site folder. This ensures it is
on the path, but also ensures any .pth files are processed on app startup.
(cherry picked from commit b38810b)

Co-authored-by: Russell Keith-Magee <russell@keith-magee.com>
freakboy3742 added a commit that referenced this pull request Jun 27, 2025
…ctory (GH-135967) (#136013)

The iOS testbed now treats the app_packages folder as a site folder. This ensures it is
on the path, but also ensures any .pth files are processed on app startup.
(cherry picked from commit b38810b)
AndPuQing pushed a commit to AndPuQing/cpython that referenced this pull request Jul 11, 2025
…tory (python#135967)

The iOS testbed now treats the app_packages folder as a site folder. This ensures it is
on the path, but also ensures any .pth files are processed on app startup.
Pranjal095 pushed a commit to Pranjal095/cpython that referenced this pull request Jul 12, 2025
…tory (python#135967)

The iOS testbed now treats the app_packages folder as a site folder. This ensures it is
on the path, but also ensures any .pth files are processed on app startup.
taegyunkim pushed a commit to taegyunkim/cpython that referenced this pull request Aug 4, 2025
…tory (python#135967)

The iOS testbed now treats the app_packages folder as a site folder. This ensures it is
on the path, but also ensures any .pth files are processed on app startup.
Agent-Hellboy pushed a commit to Agent-Hellboy/cpython that referenced this pull request Aug 19, 2025
…tory (python#135967)

The iOS testbed now treats the app_packages folder as a site folder. This ensures it is
on the path, but also ensures any .pth files are processed on app startup.
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