summarylogtreecommitdiffstats
path: root/0003-MinGW-w64-Look-in-same-dir-as-script-for-exe.patch
blob: a751d403892e81783f9cb64f7c858682e12a5389 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
--- setuptools-5.4.1/launcher.c.orig   2014-06-29 02:40:09.000000000 +0100
+++ setuptools-5.4.1/launcher.c        2014-10-19 13:37:21.272787900 +0100
@@ -154,14 +154,16 @@
         }
     }
 
-    /* Use the script's parent directory, which should be the Python home
-       (This should only be used for bdist_wininst-installed scripts, because
+    /* Use the script's directory (parent directory if not mingw-w64), which should be the
+	   Python home (This should only be used for bdist_wininst-installed scripts, because
         easy_install-ed scripts use the absolute path to python[w].exe
     */
     _splitpath(script, drive, dir, fname, ext);
     result = dir + strlen(dir) -1;
+#if !defined(__MINGW64_VERSION_MAJOR)
     if (*result == '\\') result--;
     while (*result != '\\' && result>=dir) *result-- = 0;
+#endif
     _makepath(path, drive, dir, exename, NULL);
     return loadable_exe(path);
 }