diff options
-rwxr-xr-x | bin/qmk | 16 |
1 files changed, 7 insertions, 9 deletions
@@ -13,9 +13,6 @@ qmk_dir = script_dir.parent | |||
13 | python_lib_dir = Path(qmk_dir / 'lib' / 'python').resolve() | 13 | python_lib_dir = Path(qmk_dir / 'lib' / 'python').resolve() |
14 | sys.path.append(str(python_lib_dir)) | 14 | sys.path.append(str(python_lib_dir)) |
15 | 15 | ||
16 | # Setup the CLI | ||
17 | import milc # noqa | ||
18 | |||
19 | 16 | ||
20 | def _check_modules(requirements): | 17 | def _check_modules(requirements): |
21 | """ Check if the modules in the given requirements.txt are available. | 18 | """ Check if the modules in the given requirements.txt are available. |
@@ -39,19 +36,20 @@ def _check_modules(requirements): | |||
39 | 36 | ||
40 | if not find_spec(module['import']): | 37 | if not find_spec(module['import']): |
41 | print('Could not find module %s!' % module['name']) | 38 | print('Could not find module %s!' % module['name']) |
39 | print('Please run `python3 -m pip install -r %s` to install required python dependencies.' % str(qmk_dir / requirements)) | ||
42 | if developer: | 40 | if developer: |
43 | print('Please run `pip3 install -r requirements-dev.txt` to install the python development dependencies or turn off developer mode with `qmk config user.developer=None`.') | 41 | print('You can also turn off developer mode: qmk config user.developer=None') |
44 | print() | 42 | print() |
45 | else: | 43 | exit(255) |
46 | print('Please run `pip3 install -r requirements.txt` to install the python dependencies.') | ||
47 | print() | ||
48 | exit(255) | ||
49 | 44 | ||
50 | 45 | ||
51 | developer = False | 46 | developer = False |
52 | # Make sure our modules have been setup | 47 | # Make sure our modules have been setup |
53 | _check_modules('requirements.txt') | 48 | _check_modules('requirements.txt') |
54 | 49 | ||
50 | # Setup the CLI | ||
51 | import milc # noqa | ||
52 | |||
55 | # For developers additional modules are needed | 53 | # For developers additional modules are needed |
56 | if milc.cli.config.user.developer: | 54 | if milc.cli.config.user.developer: |
57 | developer = True | 55 | developer = True |