Mercurial > cpython-lru_cache-weakref
comparison 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 |
comparison
equal
deleted
inserted
replaced
| 77518:d7a72fdcc168 | 77519:c3616595dada |
|---|---|
| 240 _PyImportZip_Init(); | 240 _PyImportZip_Init(); |
| 241 } | 241 } |
| 242 | 242 |
| 243 | 243 |
| 244 void | 244 void |
| 245 Py_InitializeEx(int install_sigs) | 245 _Py_InitializeEx_Private(int install_sigs, int install_importlib) |
| 246 { | 246 { |
| 247 PyInterpreterState *interp; | 247 PyInterpreterState *interp; |
| 248 PyThreadState *tstate; | 248 PyThreadState *tstate; |
| 249 PyObject *bimod, *sysmod, *pstderr; | 249 PyObject *bimod, *sysmod, *pstderr; |
| 250 char *p; | 250 char *p; |
| 361 Py_FatalError("Py_Initialize: can't initialize faulthandler"); | 361 Py_FatalError("Py_Initialize: can't initialize faulthandler"); |
| 362 | 362 |
| 363 /* Initialize _warnings. */ | 363 /* Initialize _warnings. */ |
| 364 _PyWarnings_Init(); | 364 _PyWarnings_Init(); |
| 365 | 365 |
| 366 if (!install_importlib) | |
| 367 return; | |
| 368 | |
| 366 import_init(interp, sysmod); | 369 import_init(interp, sysmod); |
| 367 | 370 |
| 368 _PyTime_Init(); | 371 _PyTime_Init(); |
| 369 | 372 |
| 370 if (initfsencoding(interp) < 0) | 373 if (initfsencoding(interp) < 0) |
| 388 Py_XDECREF(warnings_module); | 391 Py_XDECREF(warnings_module); |
| 389 } | 392 } |
| 390 | 393 |
| 391 if (!Py_NoSiteFlag) | 394 if (!Py_NoSiteFlag) |
| 392 initsite(); /* Module site */ | 395 initsite(); /* Module site */ |
| 396 } | |
| 397 | |
| 398 void | |
| 399 Py_InitializeEx(int install_sigs) | |
| 400 { | |
| 401 _Py_InitializeEx_Private(install_sigs, 1); | |
| 393 } | 402 } |
| 394 | 403 |
| 395 void | 404 void |
| 396 Py_Initialize(void) | 405 Py_Initialize(void) |
| 397 { | 406 { |
