Show More
@@ -328,7 +328,7 b' def checktools():' | |||||
328 | # Before we go any further, check for pre-requisite tools |
|
328 | # Before we go any further, check for pre-requisite tools | |
329 | # stuff from coreutils (cat, rm, etc) are not tested |
|
329 | # stuff from coreutils (cat, rm, etc) are not tested | |
330 | for p in requiredtools: |
|
330 | for p in requiredtools: | |
331 | if os.name == 'nt': |
|
331 | if os.name == 'nt' and not p.endswith('.exe'): | |
332 | p += '.exe' |
|
332 | p += '.exe' | |
333 | found = findprogram(p) |
|
333 | found = findprogram(p) | |
334 | if found: |
|
334 | if found: | |
@@ -365,18 +365,24 b' def usecorrectpython():' | |||||
365 | exename = 'python' |
|
365 | exename = 'python' | |
366 | if sys.platform == 'win32': |
|
366 | if sys.platform == 'win32': | |
367 | exename = 'python.exe' |
|
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 | mypython = os.path.join(BINDIR, exename) |
|
371 | mypython = os.path.join(BINDIR, exename) | |
370 | try: |
|
372 | try: | |
371 | os.symlink(sys.executable, mypython) |
|
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 | except OSError, err: |
|
374 | except OSError, err: | |
377 | # child processes may race, which is harmless |
|
375 | # child processes may race, which is harmless | |
378 | if err.errno != errno.EEXIST: |
|
376 | if err.errno != errno.EEXIST: | |
379 | raise |
|
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 | def installhg(options): |
|
387 | def installhg(options): | |
382 | vlog("# Performing temporary installation of HG") |
|
388 | vlog("# Performing temporary installation of HG") |
General Comments 0
You need to be logged in to leave comments.
Login now