Skip to content

gh-135966: Modify iOS testbed to make app_packages a site directory #135967

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jun 27, 2025

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 <[email protected]>
@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 <[email protected]>
@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 <[email protected]>
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)
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