mirror of
https://github.com/python/cpython.git
synced 2025-12-04 00:30:19 +00:00
bpo-36763: Add _Py_InitializeMain() (GH-13362)
* Add a private _Py_InitializeMain() function. * Add again _PyCoreConfig._init_main. * _Py_InitializeFromConfig() now uses _init_main to decide if _Py_InitializeMainInterpreter() should be called. * _PyCoreConfig: rename _frozen to pathconfig_warnings, its value is now the opposite of Py_FrozenFlag. * Add an unit test for _init_main=0 and _Py_InitializeMain().
This commit is contained in:
parent
ae239f6b06
commit
9ef5dcaa0b
10 changed files with 130 additions and 40 deletions
|
|
@ -493,7 +493,7 @@ calculate_prefix(const _PyCoreConfig *core_config,
|
|||
}
|
||||
|
||||
if (!calculate->prefix_found) {
|
||||
if (!core_config->_frozen) {
|
||||
if (core_config->pathconfig_warnings) {
|
||||
fprintf(stderr,
|
||||
"Could not find platform independent libraries <prefix>\n");
|
||||
}
|
||||
|
|
@ -681,7 +681,7 @@ calculate_exec_prefix(const _PyCoreConfig *core_config,
|
|||
}
|
||||
|
||||
if (!calculate->exec_prefix_found) {
|
||||
if (!core_config->_frozen) {
|
||||
if (core_config->pathconfig_warnings) {
|
||||
fprintf(stderr,
|
||||
"Could not find platform dependent libraries <exec_prefix>\n");
|
||||
}
|
||||
|
|
@ -1206,7 +1206,7 @@ calculate_path_impl(const _PyCoreConfig *core_config,
|
|||
}
|
||||
|
||||
if ((!calculate->prefix_found || !calculate->exec_prefix_found) &&
|
||||
!core_config->_frozen)
|
||||
core_config->pathconfig_warnings)
|
||||
{
|
||||
fprintf(stderr,
|
||||
"Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]\n");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue