29 lines
1.1 KiB
Diff
29 lines
1.1 KiB
Diff
diff -urN a/Modules/getpath.c b/Modules/getpath.c
|
|
--- a/Modules/getpath.c 2014-12-16 09:26:33.796969000 +0100
|
|
+++ b/Modules/getpath.c 2014-12-16 10:15:36.798797800 +0100
|
|
@@ -980,6 +980,17 @@
|
|
int
|
|
_Py_CheckPython3()
|
|
{
|
|
+ /* This does not work well with mingw-w64-python. First it tries to
|
|
+ * look up \python3.dll, which it won't (or should not) find. But the
|
|
+ * real problem is when Python is freezed by cx_Freeze. sys.prefix
|
|
+ * is then /, and Python tries to load /\DLLs\python3.dll, which makes
|
|
+ * windows try to load python3.dll from a network address, causing
|
|
+ * a several seconds long delay before proceeding. Since this code does
|
|
+ * not do anything useful in the current state, we might just as
|
|
+ * well return immediately. */
|
|
+#ifdef __MINGW32__
|
|
+ return 0;
|
|
+#else
|
|
wchar_t py3path[MAXPATHLEN+1];
|
|
wchar_t *s;
|
|
if (python3_checked)
|
|
@@ -1002,6 +1013,7 @@
|
|
wcscat(py3path, L"\\DLLs\\python3.dll");
|
|
hPython3 = LoadLibraryExW(py3path, NULL, LOAD_WITH_ALTERED_SEARCH_PATH);
|
|
return hPython3 != NULL;
|
|
+#endif
|
|
}
|
|
#endif
|