summaryrefslogtreecommitdiffstats
path: root/Python/pythonrun.c
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2012-06-19 20:29:35 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2012-06-19 20:29:35 (GMT)
commite67f48ce5e7ad122b17e23b2705bf66cff76d42b (patch)
treee833621d743bfe9a83fb90e28f3b24f1a9829a45 /Python/pythonrun.c
parent0006aacb9dda6d62013c86aac47d977b3f04921a (diff)
downloadcpython-e67f48ce5e7ad122b17e23b2705bf66cff76d42b.zip
cpython-e67f48ce5e7ad122b17e23b2705bf66cff76d42b.tar.gz
cpython-e67f48ce5e7ad122b17e23b2705bf66cff76d42b.tar.bz2
Issue #14928: Fix importlib bootstrap issues by using a custom executable (Modules/_freeze_importlib) to build Python/importlib.h.
Diffstat (limited to 'Python/pythonrun.c')
-rw-r--r--Python/pythonrun.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/Python/pythonrun.c b/Python/pythonrun.c
index d9eb5e7..d9d2fdd 100644
--- a/Python/pythonrun.c
+++ b/Python/pythonrun.c
@@ -242,7 +242,7 @@ import_init(PyInterpreterState *interp, PyObject *sysmod)
void
-Py_InitializeEx(int install_sigs)
+_Py_InitializeEx_Private(int install_sigs, int install_importlib)
{
PyInterpreterState *interp;
PyThreadState *tstate;
@@ -363,6 +363,9 @@ Py_InitializeEx(int install_sigs)
/* Initialize _warnings. */
_PyWarnings_Init();
+ if (!install_importlib)
+ return;
+
import_init(interp, sysmod);
_PyTime_Init();
@@ -393,6 +396,12 @@ Py_InitializeEx(int install_sigs)
}
void
+Py_InitializeEx(int install_sigs)
+{
+ _Py_InitializeEx_Private(install_sigs, 1);
+}
+
+void
Py_Initialize(void)
{
Py_InitializeEx(1);