##// END OF EJS Templates
run-tests: extend PATH on Windows to include user installed scripts...
Matt Harbison -
r46685:9e785d94 default
parent child Browse files
Show More
@@ -3484,7 +3484,29 b' class TestRunner(object):'
3484 path = os.environ['PATH'].split(os.pathsep)
3484 path = os.environ['PATH'].split(os.pathsep)
3485 while exedir in path:
3485 while exedir in path:
3486 path.remove(exedir)
3486 path.remove(exedir)
3487 os.environ['PATH'] = os.pathsep.join([exedir] + path)
3487
3488 # Binaries installed by pip into the user area like pylint.exe may
3489 # not be in PATH by default.
3490 extra_paths = [exedir]
3491 vi = sys.version_info
3492 if 'APPDATA' in os.environ:
3493 scripts_dir = os.path.join(
3494 os.environ['APPDATA'],
3495 'Python',
3496 'Python%d%d' % (vi[0], vi[1]),
3497 'Scripts',
3498 )
3499
3500 if vi.major == 2:
3501 scripts_dir = os.path.join(
3502 os.environ['APPDATA'],
3503 'Python',
3504 'Scripts',
3505 )
3506
3507 extra_paths.append(scripts_dir)
3508
3509 os.environ['PATH'] = os.pathsep.join(extra_paths + path)
3488 if not self._findprogram(pyexename):
3510 if not self._findprogram(pyexename):
3489 print("WARNING: Cannot find %s in search path" % pyexename)
3511 print("WARNING: Cannot find %s in search path" % pyexename)
3490
3512
General Comments 0
You need to be logged in to leave comments. Login now