(path)
| 25 | |
| 26 | |
| 27 | def _normalizePath(path): |
| 28 | path = os.path.abspath(path) |
| 29 | |
| 30 | best = None |
| 31 | |
| 32 | paths = list(sys.path) |
| 33 | |
| 34 | # Nuitka standalone mode. |
| 35 | try: |
| 36 | paths.append(__nuitka_binary_dir) |
| 37 | paths.append(os.getcwd()) |
| 38 | except NameError: |
| 39 | pass |
| 40 | |
| 41 | for path_entry in paths: |
| 42 | path_entry = os.path.normcase(path_entry) |
| 43 | |
| 44 | if os.path.normcase(path).startswith(path_entry): |
| 45 | if best is None or len(path_entry) > len(best): |
| 46 | best = path_entry |
| 47 | |
| 48 | if best is not None: |
| 49 | path = "$PYTHONPATH" + path[len(best) :] |
| 50 | |
| 51 | return path |
| 52 | |
| 53 | |
| 54 | def _moduleRepr(module): |
no test coverage detected
searching dependent graphs…