Title: Allow static, non-framework iOS builds · Issue #156109 · python/cpython · GitHub
Open Graph Title: Allow static, non-framework iOS builds · Issue #156109 · python/cpython
X Title: Allow static, non-framework iOS builds · Issue #156109 · python/cpython
Description: Feature or enhancement Proposal: configure refuses any iOS build that is not a framework build, in both the explicit and the default path: configure.ac:582 iOS) AC_MSG_ERROR([iOS builds must use --enable-framework]) ;; # --disable-framew...
Open Graph Description: Feature or enhancement Proposal: configure refuses any iOS build that is not a framework build, in both the explicit and the default path: configure.ac:582 iOS) AC_MSG_ERROR([iOS builds must use --...
X Description: Feature or enhancement Proposal: configure refuses any iOS build that is not a framework build, in both the explicit and the default path: configure.ac:582 iOS) AC_MSG_ERROR([iOS builds must use --...
Opengraph URL: https://github.com/python/cpython/issues/156109
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Allow static, non-framework iOS builds","articleBody":"# Feature or enhancement\n\n### Proposal:\n\n`configure` refuses any iOS build that is not a framework build, in both the explicit and the default path:\n\n```\nconfigure.ac:582 iOS) AC_MSG_ERROR([iOS builds must use --enable-framework]) ;; # --disable-framework\nconfigure.ac:692 iOS) AC_MSG_ERROR([iOS builds must use --enable-framework]) ;; # no framework option given\n```\n\nThe requirement is sound for a *shared* Python: an iOS app can only load a signed framework, never a bare dylib, so a dynamically loaded libpython has to be packaged as one. It does not hold for a *static* one. A `--disable-shared` build produces `libpython3.x.a`, which is linked into the app binary and loads nothing at runtime, so there is no framework to sign, package or load — but `configure` rejects that configuration before it can be attempted.\n\nThis matters for embedders, which link libpython statically into a single signed executable. Today they have to either patch `configure` locally or give up `sys.platform == \"ios\"` and cross-build as `Darwin`, which misreports the platform to the stdlib.\n\nTwo other places assume the framework exists whenever `ac_sys_system` is iOS:\n\n```\nconfigure.ac:3838 LINKFORSHARED=\"… $(PYTHONFRAMEWORKDIR)/$(PYTHONFRAMEWORK)\"\nconfigure.ac:6767 MODULE_DEPS_SHARED=\"… $(PYTHONFRAMEWORKDIR)/$(PYTHONFRAMEWORK)\"\n```\n\nThe Darwin arm immediately above the first one already guards the identical append with `if test \"$enable_framework\"`; the iOS arm does it unconditionally.\n\nSuggested shape, keeping the change conservative:\n\n- refuse only the combination that genuinely cannot work — a shared build with no framework — checked once `PY_ENABLE_SHARED` is known;\n- gate the two framework appends on `enable_framework`, matching the Darwin arm;\n- leave the default path (no framework option at all) erroring, so a non-framework build stays an explicit opt-in, with the message naming `--disable-framework`.\n\nI have this working against `main` and will open a PR. Verified locally on macOS/arm64:\n\n- `--host=arm64-apple-ios12.0 --disable-shared --disable-framework` configures and `make libpython3.16.a` succeeds, producing an arm64 archive with `LC_BUILD_VERSION platform 2, minos 12.0`;\n- `--disable-framework --enable-shared` is rejected with the new message;\n- no framework option is still rejected;\n- `--enable-framework` produces a byte-identical `Makefile` and `pyconfig.h` to unpatched `main`, so the supported framework build is unaffected.\n\n### Has this already been discussed elsewhere?\n\nThis is a minor feature, which does not need previous discussion elsewhere\n\n### Links to previous discussion of this feature:\n\n_No response_\n\n\u003c!-- gh-linked-prs -->\n### Linked PRs\n* gh-156110\n\u003c!-- /gh-linked-prs -->\n","author":{"url":"https://github.com/clementperon","@type":"Person","name":"clementperon"},"datePublished":"2026-08-20T13:31:51Z","url":"https://github.com/python/cpython/issues/156109"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:ba133163-bb82-ec7c-cc32-ed3d6460b9f9 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | DE42:19AA62:389912B:47D98C4:6B01F24F |
| html-safe-nonce | b1bb55fb50cca57c14b234d8ea8f77948b3f151f1f740bc5231190b68e5e7b30 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJERTQyOjE5QUE2MjozODk5MTJCOjQ3RDk4QzQ6NkIwMUYyNEYiLCJ2aXNpdG9yX2lkIjoiMjAyNzIyNjA2NDQ1MDg3NTk4NCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | d7d207f935b7517c392fa891e11a69e1cc5ea8808226054af9d7b7c6bdaad19f |
| hovercard-subject-tag | issue:5203958206 |
| github-keyboard-shortcuts | repository,issues,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/_view_fragments/issues/show/python/cpython/156109/issue_layout |
| twitter:image | https://opengraph.githubassets.com/53c74483798a855652068e2ec48c54327f9cb48ffdce6dd230498e23690eecbe/python/cpython/issues/156109 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/53c74483798a855652068e2ec48c54327f9cb48ffdce6dd230498e23690eecbe/python/cpython/issues/156109 |
| og:image:alt | Feature or enhancement Proposal: configure refuses any iOS build that is not a framework build, in both the explicit and the default path: configure.ac:582 iOS) AC_MSG_ERROR([iOS builds must use --... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | clementperon |
| hostname | github.com |
| expected-hostname | github.com |
| None | 87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456 |
| turbo-cache-control | no-preview |
| 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 |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 423dbb54c5e7bfecc838eb387c1435eb3d0e760d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width