Show More
@@ -328,7 +328,7 b' def checktools():' | |||
|
328 | 328 | # Before we go any further, check for pre-requisite tools |
|
329 | 329 | # stuff from coreutils (cat, rm, etc) are not tested |
|
330 | 330 | for p in requiredtools: |
|
331 | if os.name == 'nt': | |
|
331 | if os.name == 'nt' and not p.endswith('.exe'): | |
|
332 | 332 | p += '.exe' |
|
333 | 333 | found = findprogram(p) |
|
334 | 334 | if found: |
@@ -365,18 +365,24 b' def usecorrectpython():' | |||
|
365 | 365 | exename = 'python' |
|
366 | 366 | if sys.platform == 'win32': |
|
367 | 367 | exename = 'python.exe' |
|
368 | vlog('# Making python executable in test path use correct Python') | |
|
368 | if getattr(os, 'symlink', None): | |
|
369 | vlog("# Making python executable in test path a symlink to '%s'" % | |
|
370 | sys.executable) | |
|
369 | 371 | mypython = os.path.join(BINDIR, exename) |
|
370 | 372 | try: |
|
371 | 373 | os.symlink(sys.executable, mypython) |
|
372 | except AttributeError: | |
|
373 | # windows fallback | |
|
374 | shutil.copyfile(sys.executable, mypython) | |
|
375 | shutil.copymode(sys.executable, mypython) | |
|
376 | 374 | except OSError, err: |
|
377 | 375 | # child processes may race, which is harmless |
|
378 | 376 | if err.errno != errno.EEXIST: |
|
379 | 377 | raise |
|
378 | else: | |
|
379 | vlog("# Modifying search path to find %s in '%s'" % (exename, exedir)) | |
|
380 | path = os.environ['PATH'].split(os.pathsep) | |
|
381 | while exedir in path: | |
|
382 | path.remove(exedir) | |
|
383 | os.environ['PATH'] = os.pathsep.join([exedir] + path) | |
|
384 | if not findprogram(exename): | |
|
385 | print "WARNING: Cannot find %s in search path" % exename | |
|
380 | 386 | |
|
381 | 387 | def installhg(options): |
|
382 | 388 | vlog("# Performing temporary installation of HG") |
General Comments 0
You need to be logged in to leave comments.
Login now