mirror of
https://github.com/python/cpython.git
synced 2025-11-25 04:34:37 +00:00
bpo-46890: Fix setting of sys._base_executable with framework builds on macOS (GH-31958)
The side effect of this bug was that venv environments directly used the main interpreter instead of the intermediate stub executable, which can cause problems when a script uses system APIs that require the use of an application bundle.
This commit is contained in:
parent
a0c700480b
commit
6aaf4cd866
5 changed files with 200 additions and 2 deletions
|
|
@ -875,6 +875,11 @@ _PyConfig_InitPathConfig(PyConfig *config, int compute_path_config)
|
|||
!decode_to_dict(dict, "os_name", "darwin") ||
|
||||
#else
|
||||
!decode_to_dict(dict, "os_name", "posix") ||
|
||||
#endif
|
||||
#ifdef WITH_NEXT_FRAMEWORK
|
||||
!int_to_dict(dict, "WITH_NEXT_FRAMEWORK", 1) ||
|
||||
#else
|
||||
!int_to_dict(dict, "WITH_NEXT_FRAMEWORK", 0) ||
|
||||
#endif
|
||||
!decode_to_dict(dict, "PREFIX", PREFIX) ||
|
||||
!decode_to_dict(dict, "EXEC_PREFIX", EXEC_PREFIX) ||
|
||||
|
|
@ -943,3 +948,4 @@ _PyConfig_InitPathConfig(PyConfig *config, int compute_path_config)
|
|||
|
||||
return _PyStatus_OK();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue