Title: gh-81218: Make macOS framework builds relocatable via @rpath by dmnq-f · Pull Request #144305 · python/cpython · GitHub
Open Graph Title: gh-81218: Make macOS framework builds relocatable via @rpath by dmnq-f · Pull Request #144305 · python/cpython
X Title: gh-81218: Make macOS framework builds relocatable via @rpath by dmnq-f · Pull Request #144305 · python/cpython
Description: With these changes, macOS framework builds (--enable-framework) produce relocatable frameworks. The installed framework can be moved to any location and will work without requiring install_name_tool rewriting by users. This uses install-time transformation: build-time behavior is unchanged (absolute install names), and install_name_tool transforms the installed binaries to use appropriate @rpath. iOS target already uses @rpath at build time because iOS builds are cross-compiled—there's no ./python.exe execution, no venvs, no shell script tests during development. macOS framework builds are different though and would break build-tree workflows because venv symlinks cause @executable_path to resolve to the wrong directory, SIP strips DYLD_FRAMEWORK_PATH from shell scripts, and so on. The install-time approach avoids all these issues, introducing no regression for build-tree workflows, follows existing patterns (CMake projects, Qt, ...) and makes the installed framework fully relocatable by default. Changes Add -headerpad_max_install_names to LINKFORSHARED and pythonw build Transform dylib install name to @rpath at install time Add LC_RPATH entries to installed binaries (bin/python3, Python.app) Compute rpath depths dynamically via os.path.relpath() Related Closes #81218 Also resolves #86680 Issue: gh-81218
Open Graph Description: With these changes, macOS framework builds (--enable-framework) produce relocatable frameworks. The installed framework can be moved to any location and will work without requiring install_name_too...
X Description: With these changes, macOS framework builds (--enable-framework) produce relocatable frameworks. The installed framework can be moved to any location and will work without requiring install_name_too...
Opengraph URL: https://github.com/python/cpython/pull/144305
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:26540775-92da-d5ac-7958-4e4b55ca74d0 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | B8AE:D445D:12AF85E:1948A9A:6A52165E |
| html-safe-nonce | 05e2b4d7b110bb0b821e9f8cf004cc9a30131fca005d50ba9260ad0131b8ad01 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCOEFFOkQ0NDVEOjEyQUY4NUU6MTk0OEE5QTo2QTUyMTY1RSIsInZpc2l0b3JfaWQiOiIxMDg2MjA2MDc0Mjc5ODI3MDM4IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 6fe9561267cbcb657ee65b89bba66246a9a3e1fdd40f38fa77878e535df12fae |
| hovercard-subject-tag | pull_request:3219094410 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/python/cpython/pull/144305/files |
| twitter:image | https://avatars.githubusercontent.com/u/32204802?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/32204802?s=400&v=4 |
| og:image:alt | With these changes, macOS framework builds (--enable-framework) produce relocatable frameworks. The installed framework can be moved to any location and will work without requiring install_name_too... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | b9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 7aed05249554b889eb33d002851a973eebcc7e91 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width