compile _bytesio and _stringio into the binary and initalize stdio before site fixing #3279
Reviewer: Alexandre Vassalotti
diff --git a/Python/pythonrun.c b/Python/pythonrun.c
index 39c86e7..3e40d51 100644
--- a/Python/pythonrun.c
+++ b/Python/pythonrun.c
@@ -239,11 +239,11 @@
}
initmain(); /* Module __main__ */
- if (!Py_NoSiteFlag)
- initsite(); /* Module site */
if (initstdio() < 0)
Py_FatalError(
"Py_Initialize: can't initialize sys standard streams");
+ if (!Py_NoSiteFlag)
+ initsite(); /* Module site */
/* auto-thread-state API, if available */
#ifdef WITH_THREAD