From acf001dca7afd219dde2b5abd928f4258c1b71e7 Mon Sep 17 00:00:00 2001 From: Antoine Pitrou Date: Tue, 19 Jun 2012 22:29:35 +0200 Subject: Issue #14928: Fix importlib bootstrap issues by using a custom executable (Modules/_freeze_importlib) to build Python/importlib.h. --- Python/pythonrun.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'Python/pythonrun.c') diff --git a/Python/pythonrun.c b/Python/pythonrun.c index d9eb5e7d9f..d9d2fdda81 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(); @@ -392,6 +395,12 @@ Py_InitializeEx(int install_sigs) initsite(); /* Module site */ } +void +Py_InitializeEx(int install_sigs) +{ + _Py_InitializeEx_Private(install_sigs, 1); +} + void Py_Initialize(void) { -- cgit v1.2.1