Compare commits
12 Commits
userspace2
...
1.1.8
| Author | SHA1 | Date | |
|---|---|---|---|
| 7be310f364 | |||
| 2316a34ce9 | |||
| 36c23e3de6 | |||
| b6bc144e9e | |||
| 93e629608e | |||
| cacd0fabbc | |||
| d9f9b5a27d | |||
| 4d4892f58a | |||
| ffe20fb63e | |||
| b384f871e8 | |||
| f2b8522c89 | |||
| 75dcb0e475 |
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
[bumpversion]
|
[bumpversion]
|
||||||
current_version = 1.1.6
|
current_version = 1.1.8
|
||||||
commit = True
|
commit = True
|
||||||
tag = True
|
tag = True
|
||||||
tag_name = {new_version}
|
tag_name = {new_version}
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ jobs:
|
|||||||
- name: (MSYS2) Install Python dependencies
|
- name: (MSYS2) Install Python dependencies
|
||||||
shell: msys2 {0}
|
shell: msys2 {0}
|
||||||
run: |
|
run: |
|
||||||
python3 -m pip install --upgrade pip
|
python3 -m pip install --break-system-packages --force-reinstall --upgrade pip
|
||||||
|
|
||||||
- name: (MSYS2) Install QMK CLI from source
|
- name: (MSYS2) Install QMK CLI from source
|
||||||
shell: msys2 {0}
|
shell: msys2 {0}
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ jobs:
|
|||||||
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
|
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
|
||||||
|
|
||||||
- name: Build and Push to Docker Hub
|
- name: Build and Push to Docker Hub
|
||||||
uses: docker/build-push-action@v6.9.0
|
uses: docker/build-push-action@v6.16.0
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
push: true
|
push: true
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ jobs:
|
|||||||
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
|
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
|
||||||
|
|
||||||
- name: Build and Push to Docker Hub
|
- name: Build and Push to Docker Hub
|
||||||
uses: docker/build-push-action@v6.9.0
|
uses: docker/build-push-action@v6.16.0
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
push: true
|
push: true
|
||||||
|
|||||||
+1
-1
@@ -1,3 +1,3 @@
|
|||||||
"""A program to help you work with qmk_firmware."""
|
"""A program to help you work with qmk_firmware."""
|
||||||
|
|
||||||
__version__ = '1.1.6'
|
__version__ = '1.1.8'
|
||||||
|
|||||||
+4
-2
@@ -26,7 +26,7 @@ def is_qmk_firmware(qmk_firmware):
|
|||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
@lru_cache(maxsize=2)
|
@lru_cache(maxsize=1)
|
||||||
def find_qmk_firmware():
|
def find_qmk_firmware():
|
||||||
"""Look for qmk_firmware in the usual places.
|
"""Look for qmk_firmware in the usual places.
|
||||||
|
|
||||||
@@ -47,6 +47,7 @@ def find_qmk_firmware():
|
|||||||
return Path.home() / 'qmk_firmware'
|
return Path.home() / 'qmk_firmware'
|
||||||
|
|
||||||
|
|
||||||
|
@lru_cache(maxsize=1)
|
||||||
def in_qmk_firmware():
|
def in_qmk_firmware():
|
||||||
"""Returns the path to the qmk_firmware we are currently in, or None if we are not inside qmk_firmware.
|
"""Returns the path to the qmk_firmware we are currently in, or None if we are not inside qmk_firmware.
|
||||||
"""
|
"""
|
||||||
@@ -73,7 +74,7 @@ def is_qmk_userspace(qmk_userspace):
|
|||||||
return False
|
return False
|
||||||
|
|
||||||
|
|
||||||
@lru_cache(maxsize=2)
|
@lru_cache(maxsize=1)
|
||||||
def find_qmk_userspace():
|
def find_qmk_userspace():
|
||||||
"""Look for qmk_userspace in the usual places.
|
"""Look for qmk_userspace in the usual places.
|
||||||
"""
|
"""
|
||||||
@@ -92,6 +93,7 @@ def find_qmk_userspace():
|
|||||||
return Path.home() / 'qmk_userspace'
|
return Path.home() / 'qmk_userspace'
|
||||||
|
|
||||||
|
|
||||||
|
@lru_cache(maxsize=1)
|
||||||
def in_qmk_userspace():
|
def in_qmk_userspace():
|
||||||
"""Returns the path to the qmk_userspace we are currently in, or None if we are not inside qmk_userspace.
|
"""Returns the path to the qmk_userspace we are currently in, or None if we are not inside qmk_userspace.
|
||||||
"""
|
"""
|
||||||
|
|||||||
+17
-2
@@ -52,7 +52,19 @@ def main():
|
|||||||
if 'windows' in platform().lower():
|
if 'windows' in platform().lower():
|
||||||
msystem = os.environ.get('MSYSTEM', '')
|
msystem = os.environ.get('MSYSTEM', '')
|
||||||
|
|
||||||
if 'mingw64' not in sys.executable or 'MINGW64' not in msystem:
|
# Assume the environment isn't workable by default
|
||||||
|
env_ok = False
|
||||||
|
|
||||||
|
# Check if we're using the mingw64/msys2 environment
|
||||||
|
if 'mingw64' in sys.executable and 'MINGW64' in msystem:
|
||||||
|
env_ok = True
|
||||||
|
|
||||||
|
# Check if we're using a `uv`-based environment
|
||||||
|
if '\\uv\\' in sys.executable or '/uv/' in sys.executable:
|
||||||
|
env_ok = True
|
||||||
|
|
||||||
|
# If none of the options above were true, then we're in an unsupported environment. Bomb out.
|
||||||
|
if not env_ok:
|
||||||
print('ERROR: It seems you are not using the MINGW64 terminal.')
|
print('ERROR: It seems you are not using the MINGW64 terminal.')
|
||||||
print('Please close this terminal and open a new MSYS2 MinGW 64-bit terminal.')
|
print('Please close this terminal and open a new MSYS2 MinGW 64-bit terminal.')
|
||||||
print('Python: %s, MSYSTEM: %s' % (sys.executable, msystem))
|
print('Python: %s, MSYSTEM: %s' % (sys.executable, msystem))
|
||||||
@@ -61,7 +73,10 @@ def main():
|
|||||||
# Environment setup
|
# Environment setup
|
||||||
qmk_userspace = find_qmk_userspace()
|
qmk_userspace = find_qmk_userspace()
|
||||||
qmk_firmware = find_qmk_firmware()
|
qmk_firmware = find_qmk_firmware()
|
||||||
os.environ['QMK_USERSPACE'] = str(qmk_userspace)
|
if is_qmk_userspace(qmk_userspace):
|
||||||
|
os.environ['QMK_USERSPACE'] = str(qmk_userspace)
|
||||||
|
elif 'QMK_USERSPACE' in os.environ: # Failed to find valid userspace, including what was in the environment if specified -- wipe any environment variable if present as it's clearly invalid.
|
||||||
|
os.environ.pop('QMK_USERSPACE')
|
||||||
os.environ['QMK_HOME'] = str(qmk_firmware)
|
os.environ['QMK_HOME'] = str(qmk_firmware)
|
||||||
os.environ['ORIG_CWD'] = os.getcwd()
|
os.environ['ORIG_CWD'] = os.getcwd()
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ ignore = E501,E226
|
|||||||
|
|
||||||
[metadata]
|
[metadata]
|
||||||
name = qmk
|
name = qmk
|
||||||
version = 1.1.6
|
version = 1.1.8
|
||||||
author = skullydazed
|
author = skullydazed
|
||||||
author_email = skullydazed@gmail.com
|
author_email = skullydazed@gmail.com
|
||||||
description = A program to help users work with QMK Firmware.
|
description = A program to help users work with QMK Firmware.
|
||||||
@@ -39,7 +39,6 @@ install_requires =
|
|||||||
hid
|
hid
|
||||||
milc>=1.9.0
|
milc>=1.9.0
|
||||||
pyusb
|
pyusb
|
||||||
setuptools>=45
|
|
||||||
# qmk_firmware packages
|
# qmk_firmware packages
|
||||||
dotty-dict
|
dotty-dict
|
||||||
hjson
|
hjson
|
||||||
|
|||||||
Reference in New Issue
Block a user