Title: bpo-36231: Support building on macOS without /usr/include by ned-deily · Pull Request #13773 · python/cpython · GitHub
Open Graph Title: bpo-36231: Support building on macOS without /usr/include by ned-deily · Pull Request #13773 · python/cpython
X Title: bpo-36231: Support building on macOS without /usr/include by ned-deily · Pull Request #13773 · python/cpython
Description: Apple has been trying to discourage the use of installing and compiling with system header files in /usr/include. Instead, the favored approach is to use header files from within a macOS SDK. For the most part, the Apple-supplied toolchain handles this transparently as long as the toolchain is doing the searching for header files. Unfortunately, the top-level setup.py used to build the Python interpreter does some searching for various header files on its own and, with the removal in macOS 10.14 of the option to install system headers, the Python build may now fail to build several standard library modules that depend on third-party libraries shipped with macOS, for example, sqlite3. The search behavior of the toolchain is also conditioned by the setting of various environment variables or by the use of xcrun, i.e. it is possible to change SDK locations at build time (man xcrun has more information). And non-Apple compilers might be in use so xcrun might not give the correct results. If an SDK is not explicitly specified at ./configure time or via CFLAGS, the solution used here is to rely on using the -v output from the compiler preprocessor to find the include file paths that are actually being used (this technique is used elsewhere in setup.py) and from them derive an SDK root for setup.py to use in its searches. There is a bit of a bootstrap issue in that much of the standard library is not yet available when setup.py is running (it's trying to build the non-builtin modules) so the code here has to make do with a few hacks. https://bugs.python.org/issue36231
Open Graph Description: Apple has been trying to discourage the use of installing and compiling with system header files in /usr/include. Instead, the favored approach is to use header files from within a macOS SDK. For...
X Description: Apple has been trying to discourage the use of installing and compiling with system header files in /usr/include. Instead, the favored approach is to use header files from within a macOS SDK. For...
Opengraph URL: https://github.com/python/cpython/pull/13773
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:bfad69b8-0148-e284-9a6b-b85e87d3bde7 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | BE7E:230F9A:3DE897:540C35:6A51E1C4 |
| html-safe-nonce | d7dc83feefbda982c9586f7036a32227aa133bc09f0c40070b0d430d635e8da9 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCRTdFOjIzMEY5QTozREU4OTc6NTQwQzM1OjZBNTFFMUM0IiwidmlzaXRvcl9pZCI6IjcwNDczMTM3NDU1ODQ5NzIyMjgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 045f0cd446fab24a3f5893d098ba51ddd26479a02b1530ccb555c5ffd4a85acb |
| hovercard-subject-tag | pull_request:284498390 |
| 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/13773/files |
| twitter:image | https://avatars.githubusercontent.com/u/5833005?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/5833005?s=400&v=4 |
| og:image:alt | Apple has been trying to discourage the use of installing and compiling with system header files in /usr/include. Instead, the favored approach is to use header files from within a macOS SDK. For... |
| 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