* Initial python-3.7 port * python3: Add setup.config.in to remove before patching * python3: Implement setenv for mingw. Fix building with NT threads. Build with unicode * Fix typos * Fix linking core modules * Mingw build have exec_prefix * Remove deprecated patch * Fix building python and modules. Failing to build readline module and install not working yet * More getpath changes and more aggressive path separator conversion * Fix readline module compilation and linking errors * python3: By default building with posix threads, NT threads are broken. Some patches optimization. First buildable commit * Py_DecodeLocale handle char, not wchar * Fix building multiprocessing module with posix threads
29 lines
961 B
Diff
29 lines
961 B
Diff
diff -Naur Python-3.7.0-orig/Modules/getpath.c Python-3.7.0/Modules/getpath.c
|
|
--- Python-3.7.0-orig/Modules/getpath.c 2018-06-30 11:17:05.435508900 +0300
|
|
+++ Python-3.7.0/Modules/getpath.c 2018-06-30 11:17:35.839962300 +0300
|
|
@@ -884,6 +884,10 @@
|
|
|
|
bufsz += wcslen(calculate->zip_path) + 1;
|
|
bufsz += wcslen(exec_prefix) + 1;
|
|
+#ifdef MS_WINDOWS
|
|
+ if (calculate->exec_prefix)
|
|
+ bufsz += wcslen(calculate->exec_prefix) + 1;
|
|
+#endif
|
|
|
|
/* Allocate the buffer */
|
|
wchar_t *buf = PyMem_RawMalloc(bufsz * sizeof(wchar_t));
|
|
@@ -931,6 +935,13 @@
|
|
}
|
|
defpath = delim + 1;
|
|
}
|
|
+#ifdef MS_WINDOWS
|
|
+ if (calculate->exec_prefix) {
|
|
+ /* Next add bin folder where the exe was found, for System DLLs e.g. tcl86.dll, tk86.dll */
|
|
+ wcscat(buf, delimiter);
|
|
+ wcscat(buf, calculate->exec_prefix);
|
|
+ }
|
|
+#endif
|
|
wcscat(buf, delimiter);
|
|
|
|
/* Finally, on goes the directory for dynamic-load modules */
|