Show More
@@ -316,7 +316,7 b' def findprogram(program):' | |||||
316 | """Search PATH for a executable program""" |
|
316 | """Search PATH for a executable program""" | |
317 | for p in os.environ.get('PATH', os.defpath).split(os.pathsep): |
|
317 | for p in os.environ.get('PATH', os.defpath).split(os.pathsep): | |
318 | name = os.path.join(p, program) |
|
318 | name = os.path.join(p, program) | |
319 | if os.access(name, os.X_OK): |
|
319 | if os.name == 'nt' or os.access(name, os.X_OK): | |
320 | return name |
|
320 | return name | |
321 | return None |
|
321 | return None | |
322 |
|
322 | |||
@@ -366,12 +366,14 b' def usecorrectpython():' | |||||
366 | # some tests run python interpreter. they must use same |
|
366 | # some tests run python interpreter. they must use same | |
367 | # interpreter we use or bad things will happen. |
|
367 | # interpreter we use or bad things will happen. | |
368 | exedir, exename = os.path.split(sys.executable) |
|
368 | exedir, exename = os.path.split(sys.executable) | |
369 |
if exename |
|
369 | if exename in ('python', 'python.exe'): | |
370 |
path = findprogram( |
|
370 | path = findprogram(exename) | |
371 | if os.path.dirname(path) == exedir: |
|
371 | if os.path.dirname(path) == exedir: | |
372 | return |
|
372 | return | |
|
373 | else: | |||
|
374 | exename = 'python' | |||
373 | vlog('# Making python executable in test path use correct Python') |
|
375 | vlog('# Making python executable in test path use correct Python') | |
374 |
mypython = os.path.join(BINDIR, |
|
376 | mypython = os.path.join(BINDIR, exename) | |
375 | try: |
|
377 | try: | |
376 | os.symlink(sys.executable, mypython) |
|
378 | os.symlink(sys.executable, mypython) | |
377 | except AttributeError: |
|
379 | except AttributeError: |
General Comments 0
You need to be logged in to leave comments.
Login now