diff Python/pythonrun.c @ 77519:c3616595dada

Issue #14928: Fix importlib bootstrap issues by using a custom executable (Modules/_freeze_importlib) to build Python/importlib.h.
author Antoine Pitrou <solipsis@pitrou.net>
date Tue, 19 Jun 2012 22:29:35 +0200
parents b0eb7d2a9542
children d63a80abfbec
line wrap: on
line diff
--- a/Python/pythonrun.c	Tue Jun 19 16:30:28 2012 +0000
+++ b/Python/pythonrun.c	Tue Jun 19 22:29:35 2012 +0200
@@ -242,7 +242,7 @@
 
 
 void
-Py_InitializeEx(int install_sigs)
+_Py_InitializeEx_Private(int install_sigs, int install_importlib)
 {
     PyInterpreterState *interp;
     PyThreadState *tstate;
@@ -363,6 +363,9 @@
     /* Initialize _warnings. */
     _PyWarnings_Init();
 
+    if (!install_importlib)
+        return;
+
     import_init(interp, sysmod);
 
     _PyTime_Init();
@@ -393,6 +396,12 @@
 }
 
 void
+Py_InitializeEx(int install_sigs)
+{
+    _Py_InitializeEx_Private(install_sigs, 1);
+}
+
+void
 Py_Initialize(void)
 {
     Py_InitializeEx(1);