aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@redhat.com>2019-05-16 17:38:16 +0200
committerGitHub <noreply@github.com>2019-05-16 17:38:16 +0200
commit9ef5dcaa0b3c7c7ba28dbb3ec0c9507d9d05e3a9 (patch)
tree56b9b45660cc83960c2752e22ee47090632ebb09 /Modules/getpath.c
parentbpo-36763: Add _PyCoreConfig.parse_argv (GH-13361) (diff)
downloadcpython-9ef5dcaa0b3c7c7ba28dbb3ec0c9507d9d05e3a9.tar.gz
cpython-9ef5dcaa0b3c7c7ba28dbb3ec0c9507d9d05e3a9.tar.bz2
cpython-9ef5dcaa0b3c7c7ba28dbb3ec0c9507d9d05e3a9.zip
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().
Diffstat (limited to 'Modules/getpath.c')
-rw-r--r--Modules/getpath.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/Modules/getpath.c b/Modules/getpath.c
index 3991ad719c1..34357e47bc2 100644
--- a/Modules/getpath.c
+++ b/Modules/getpath.c
@@ -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");