Show More
@@ -434,7 +434,7 b' def usecorrectpython():' | |||
|
434 | 434 | if getattr(os, 'symlink', None): |
|
435 | 435 | vlog("# Making python executable in test path a symlink to '%s'" % |
|
436 | 436 | sys.executable) |
|
437 | mypython = os.path.join(BINDIR, pyexename) | |
|
437 | mypython = os.path.join(TMPBINDIR, pyexename) | |
|
438 | 438 | try: |
|
439 | 439 | if os.readlink(mypython) == sys.executable: |
|
440 | 440 | return |
@@ -1215,7 +1215,7 b' def main():' | |||
|
1215 | 1215 | # we do the randomness ourself to know what seed is used |
|
1216 | 1216 | os.environ['PYTHONHASHSEED'] = str(random.getrandbits(32)) |
|
1217 | 1217 | |
|
1218 | global TESTDIR, HGTMP, INST, BINDIR, PYTHONDIR, COVERAGE_FILE | |
|
1218 | global TESTDIR, HGTMP, INST, BINDIR, TMPBINDIR, PYTHONDIR, COVERAGE_FILE | |
|
1219 | 1219 | TESTDIR = os.environ["TESTDIR"] = os.getcwd() |
|
1220 | 1220 | if options.tmpdir: |
|
1221 | 1221 | options.keep_tmpdir = True |
@@ -1244,6 +1244,8 b' def main():' | |||
|
1244 | 1244 | if options.with_hg: |
|
1245 | 1245 | INST = None |
|
1246 | 1246 | BINDIR = os.path.dirname(os.path.realpath(options.with_hg)) |
|
1247 | TMPBINDIR = os.path.join(HGTMP, 'install', 'bin') | |
|
1248 | os.makedirs(TMPBINDIR) | |
|
1247 | 1249 | |
|
1248 | 1250 | # This looks redundant with how Python initializes sys.path from |
|
1249 | 1251 | # the location of the script being executed. Needed because the |
@@ -1254,12 +1256,15 b' def main():' | |||
|
1254 | 1256 | else: |
|
1255 | 1257 | INST = os.path.join(HGTMP, "install") |
|
1256 | 1258 | BINDIR = os.environ["BINDIR"] = os.path.join(INST, "bin") |
|
1259 | TMPBINDIR = BINDIR | |
|
1257 | 1260 | PYTHONDIR = os.path.join(INST, "lib", "python") |
|
1258 | 1261 | |
|
1259 | 1262 | os.environ["BINDIR"] = BINDIR |
|
1260 | 1263 | os.environ["PYTHON"] = PYTHON |
|
1261 | 1264 | |
|
1262 | 1265 | path = [BINDIR] + os.environ["PATH"].split(os.pathsep) |
|
1266 | if TMPBINDIR != BINDIR: | |
|
1267 | path = [TMPBINDIR] + path | |
|
1263 | 1268 | os.environ["PATH"] = os.pathsep.join(path) |
|
1264 | 1269 | |
|
1265 | 1270 | # Include TESTDIR in PYTHONPATH so that out-of-tree extensions |
General Comments 0
You need to be logged in to leave comments.
Login now