diff options
| author | QMK Bot <hello@qmk.fm> | 2021-08-29 23:47:04 +0000 |
|---|---|---|
| committer | QMK Bot <hello@qmk.fm> | 2021-08-29 23:47:04 +0000 |
| commit | b46064a891332db07643f73018910c031a63aa50 (patch) | |
| tree | 216c9a4ad762f229706bdb116701d1a50788ee40 /lib | |
| parent | 92e606b927ba60a7154857918e2ba16049a880c1 (diff) | |
| parent | baa423004a870b5cb86f4d1197dcda5f8b390f49 (diff) | |
| download | qmk_firmware-b46064a891332db07643f73018910c031a63aa50.tar.gz qmk_firmware-b46064a891332db07643f73018910c031a63aa50.zip | |
Merge remote-tracking branch 'origin/master' into develop
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/python/qmk/cli/__init__.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/python/qmk/cli/__init__.py b/lib/python/qmk/cli/__init__.py index 318adf378..292dcbe81 100644 --- a/lib/python/qmk/cli/__init__.py +++ b/lib/python/qmk/cli/__init__.py | |||
| @@ -180,8 +180,14 @@ if int(milc_version[0]) < 2 and int(milc_version[1]) < 4: | |||
| 180 | print(f'Your MILC library is too old! Please upgrade: python3 -m pip install -U -r {str(requirements)}') | 180 | print(f'Your MILC library is too old! Please upgrade: python3 -m pip install -U -r {str(requirements)}') |
| 181 | exit(127) | 181 | exit(127) |
| 182 | 182 | ||
| 183 | # Make sure we can run binaries in the same directory as our Python interpreter | ||
| 184 | python_dir = os.path.dirname(sys.executable) | ||
| 185 | |||
| 186 | if python_dir not in os.environ['PATH'].split(':'): | ||
| 187 | os.environ['PATH'] = ":".join((python_dir, os.environ['PATH'])) | ||
| 188 | |||
| 183 | # Check to make sure we have all our dependencies | 189 | # Check to make sure we have all our dependencies |
| 184 | msg_install = 'Please run `python3 -m pip install -r %s` to install required python dependencies.' | 190 | msg_install = f'Please run `{sys.executable} -m pip install -r %s` to install required python dependencies.' |
| 185 | args = sys.argv[1:] | 191 | args = sys.argv[1:] |
| 186 | while args and args[0][0] == '-': | 192 | while args and args[0][0] == '-': |
| 187 | del args[0] | 193 | del args[0] |
