Title: exec_prefix not found when prefix is found at runtime when install tree is moved · Issue #107658 · python/cpython · GitHub
Open Graph Title: exec_prefix not found when prefix is found at runtime when install tree is moved · Issue #107658 · python/cpython
X Title: exec_prefix not found when prefix is found at runtime when install tree is moved · Issue #107658 · python/cpython
Description: Background: for years we've distributed a copy of python (starting with version 2.7 or before) with our app and have depended on python finding prefix & exec_prefix when they're different than the directories specified when configure is ...
Open Graph Description: Background: for years we've distributed a copy of python (starting with version 2.7 or before) with our app and have depended on python finding prefix & exec_prefix when they're different than the ...
X Description: Background: for years we've distributed a copy of python (starting with version 2.7 or before) with our app and have depended on python finding prefix & exec_prefix when they're differe...
Opengraph URL: https://github.com/python/cpython/issues/107658
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"exec_prefix not found when prefix is found at runtime when install tree is moved","articleBody":"Background: for years we've distributed a copy of python (starting with version 2.7 or before) with our app and have depended on python finding prefix \u0026 exec_prefix when they're different than the directories specified when configure is run. On macOS, we use a framework enabled build and install_name_tool to rewrite module loads paths so they are relative.\r\n\r\nWhen python 3.12b4 is built with macOS frameworks enabled and the python install tree is moved, exec_prefix is not set to the correct directory even though prefix is. The bug could also affect other builds and other platforms.\r\n\r\nTo reproduce on macOS --\r\n\r\n`cd cpython`\r\n`mkdir ../install`\r\n``./configure --with-pydebug --prefix=`pwd`/../install --enable-framework=`pwd`/../install/lib``\r\n`make install`\r\n`mv ../install ../install.moved`\r\n`DYLD_FRAMEWORK_PATH=`pwd`/../install.moved/lib ../install.moved/bin/python3`\r\n`\u003e\u003e import sys`\r\n`\u003e\u003e sys.prefix`\r\n`'/Users/jpe/install.moved/lib/Python.framework/Versions/3.13'`\r\n`\u003e\u003e\u003e sys.exec_prefix`\r\n`'/Users/jpe/cpython/../install/lib/Python.framework/Versions/3.13'`\r\n\r\nThe problem is in Modules/getpath.py -- it looks for the prefix based on the library variable but does not do this for exec_prefix. I plan to submit a pull request with a potential fix.\r\n\n\n\u003c!-- gh-linked-prs --\u003e\n### Linked PRs\n* gh-107661\n\u003c!-- /gh-linked-prs --\u003e\n","author":{"url":"https://github.com/jpe","@type":"Person","name":"jpe"},"datePublished":"2023-08-05T13:19:33.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/107658/cpython/issues/107658"}
| 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:507abd1c-f151-4555-184c-d8d127d6ce50 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9192:8A2B5:621CBA3:89B128E:6A5030FD |
| html-safe-nonce | 4911cd684a17e16c8f8f0192375b27e1d8e2e82e250775b66997e10cc2e0e6e0 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5MTkyOjhBMkI1OjYyMUNCQTM6ODlCMTI4RTo2QTUwMzBGRCIsInZpc2l0b3JfaWQiOiI1ODk1MjgwNDkxNzU0NDM0ODEzIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 86964604820cae129212ffcce39f3cbcd7e8970345508b1666d5f5c1b231b792 |
| hovercard-subject-tag | issue:1837759059 |
| 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/107658/issue_layout |
| twitter:image | https://opengraph.githubassets.com/9ace06375a428bfba0cef6b8dd4b99d60dcd65dbefc670eead4cd70f2a30ae0d/python/cpython/issues/107658 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/9ace06375a428bfba0cef6b8dd4b99d60dcd65dbefc670eead4cd70f2a30ae0d/python/cpython/issues/107658 |
| og:image:alt | Background: for years we've distributed a copy of python (starting with version 2.7 or before) with our app and have depended on python finding prefix & exec_prefix when they're different than the ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | jpe |
| hostname | github.com |
| expected-hostname | github.com |
| None | d6dc8294eb500fa36bbc57472d61fe87c522f9c3c1d64f70f4926f66a66a7efb |
| 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 | d90666eaf032b7eb8975a378efe38e37f4ebb96c |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width