Repository navigation
gh-162115: Add tooling to process site packages in an Apple Xcode project. - #162194
Open
freakboy3742 wants to merge 1 commit into
Open
freakboy3742 wants to merge 1 commit into
freakboy3742 wants to merge 1 commit into
Conversation
Documentation build overview
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Corrects the initial configuration of the Python environment in the iOS testbed:
PyConfig.module_search_pathrather than dynamically appending tosite.pathin the running interpretersite-packagesfolder, rather than manually appending theapp_packagesfolder onto the site path in the running interpreterThis ensures that all the user-supplied code is on the Python path at the time the interpreter configuration completes. This matters because the start-time configuration is what persists into sub-interpreters; without these changes, code in
appandapp_packagescan't be found in a sub-interpreter without reproducing the path modifications.It's also a lot simpler, and a lot closer to the "standard desktop" experience in terms of interpreter configuration.
To facilitate the
site-packageshandling, a newinstall_site_packagesmethod has been added to the framework utility script. This new script means we can now easily document how to handle a site-packages folder, rather than needing somewhat nebulous descriptions of how to configure a third-party packages folder.This is all backwards compatible - the historical behaviour was to treat
app_packagesas a folder that needs post-processing; any code that uses the old setup will continue to work. Projects that opt into using theinstall_site_packagesscript will have better site-related behaviour.This PR also takes the opportunity to factor out the shell script parts of the Xcode project into a standalone shell script file. Defining the script inline works, but it can be difficult to debug due to the need for double escaping.
Marked for backport to 3.14 and 3.15 because the testbed project is used by cibuildwheel (and others), and subinterpreter tests fail without these changes.