()
| 49 | |
| 50 | |
| 51 | def check_requirements(): |
| 52 | result = True |
| 53 | |
| 54 | global __make_cmd |
| 55 | __make_cmd = detect_make() |
| 56 | if __make_cmd is None: |
| 57 | result = False |
| 58 | |
| 59 | apps = ['git', 'wget'] |
| 60 | if __make_cmd in ['make', 'mingw32-make']: |
| 61 | apps.append('g++') |
| 62 | apps.append('gdb') |
| 63 | |
| 64 | for app in apps: |
| 65 | try: |
| 66 | #print('{} --version'.format(app)) |
| 67 | subprocess.check_call([app, '--version'], stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL) |
| 68 | except OSError: |
| 69 | print("Error: '{}' is required".format(app)) |
| 70 | result = False |
| 71 | |
| 72 | try: |
| 73 | # pylint: disable-next=unused-import - intentional |
| 74 | import psutil |
| 75 | except ImportError as e: |
| 76 | print("Error: {}. Module is required.".format(e)) |
| 77 | result = False |
| 78 | |
| 79 | return result |
| 80 | |
| 81 | |
| 82 | # Try and retry with exponential backoff if an exception is raised |
nothing calls this directly
no test coverage detected