Commit 97d1119d authored by Ronald Oussoren's avatar Ronald Oussoren

Ensure that sys.prefix can reliably be found

on OSX. This fixes a small issue that was exposed
by running test_subprocess through regrtest (and
hence in a subdirectory).

Without this patch running python.exe from the
build tree will fail when these tree conditions
are true:
1) the CWD is not the root of build tree
2) python.exe is found through $PATH
3) the framework is not yet installed
parent 3f5f226b
......@@ -552,7 +552,7 @@ calculate_path(void)
if (!ismodule(argv0_path)) {
/* We are in the build directory so use the name of the
executable - we know that the absolute path is passed */
wcsncpy(argv0_path, prog, MAXPATHLEN);
wcsncpy(argv0_path, progpath, MAXPATHLEN);
}
else {
/* Use the location of the library as the progpath */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment