diff -r 83540d7b7366 Lib/test/test_venv.py --- a/Lib/test/test_venv.py Sun Oct 12 10:25:33 2014 +1000 +++ b/Lib/test/test_venv.py Sat Oct 11 21:35:22 2014 -0700 @@ -102,7 +102,11 @@ else: executable = sys.executable path = os.path.dirname(executable) - self.assertIn('home = %s' % path, data) + self.assertIn('home = ', data) + homestart = data.index('home = ') + len('home = ') + homeend = data.find(os.linesep, homestart) + homeend = len(data) if homeend == -1 else homeend + self.assertTrue(os.path.samefile(path, data[homestart:homeend])) fn = self.get_env_file(self.bindir, self.exe) if not os.path.exists(fn): # diagnostics for Windows buildbot failures bd = self.get_env_file(self.bindir) diff -r 83540d7b7366 Mac/Tools/pythonw.c --- a/Mac/Tools/pythonw.c Sun Oct 12 10:25:33 2014 +1000 +++ b/Mac/Tools/pythonw.c Sat Oct 11 21:35:22 2014 -0700 @@ -163,24 +163,11 @@ * Note: don't call 'realpath', that will * erase symlink information, and that * breaks "pyvenv --symlink" - * - * It is nice to have the directory name - * as a cleaned up absolute path though, - * therefore call realpath on dirname(path) */ char* slash = strrchr(path, '/'); if (slash) { - char replaced; - replaced = slash[1]; - slash[1] = 0; - if (realpath(path, real_path) == NULL) { - err(1, "realpath: %s", path); - } - slash[1] = replaced; - if (strlcat(real_path, slash, sizeof(real_path)) > sizeof(real_path)) { - errno = EINVAL; - err(1, "realpath: %s", path); - } + strncpy(real_path, path, sizeof(real_path)); + real_path[sizeof(real_path)-1] = 0; } else { if (realpath(".", real_path) == NULL) {