mirror of
https://github.com/python/cpython.git
synced 2025-07-19 01:05:26 +00:00
Improves test_underpth_nosite_file to reveal why it fails. (#1763)
* Improves test_underpth_nosite_file to reveal why it fails. * Enable building with Windows 10 SDK. * Fix WinSDK detection * Fix initialization on Windows when a ._pth file exists. * Fix tabs * Adds comment about Py_GetPath call.
This commit is contained in:
parent
66dc33b682
commit
9b33bf50da
3 changed files with 31 additions and 7 deletions
|
@ -412,10 +412,15 @@ _Py_InitializeEx_Private(int install_sigs, int install_importlib)
|
|||
if (interp->sysdict == NULL)
|
||||
Py_FatalError("Py_Initialize: can't initialize sys dict");
|
||||
Py_INCREF(interp->sysdict);
|
||||
|
||||
/* GetPath may initialize state that _PySys_EndInit locks
|
||||
in, and so has to be called first.
|
||||
|
||||
Hopefully one day Eric Snow will fix this. */
|
||||
PySys_SetPath(Py_GetPath());
|
||||
if (_PySys_EndInit(interp->sysdict) < 0)
|
||||
Py_FatalError("Py_Initialize: can't initialize sys");
|
||||
_PyImport_FixupBuiltin(sysmod, "sys");
|
||||
PySys_SetPath(Py_GetPath());
|
||||
PyDict_SetItemString(interp->sysdict, "modules",
|
||||
interp->modules);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue