| 28 | |
| 29 | # Find all "foo.exe" files on the PATH. |
| 30 | def find_all_on_path(filename, extras=None): |
| 31 | entries = os.environ["PATH"].split(os.pathsep) |
| 32 | ret = [] |
| 33 | for p in entries: |
| 34 | fname = os.path.abspath(os.path.join(p, filename)) |
| 35 | if os.path.isfile(fname) and fname not in ret: |
| 36 | ret.append(fname) |
| 37 | if extras: |
| 38 | for p in extras: |
| 39 | fname = os.path.abspath(os.path.join(p, filename)) |
| 40 | if os.path.isfile(fname) and fname not in ret: |
| 41 | ret.append(fname) |
| 42 | return ret |
| 43 | |
| 44 | |
| 45 | # Find a suitable Perl installation for OpenSSL. |