Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 94adba52c6 | |||
| 38aefc9716 | |||
| 081fa0c8a6 | |||
| 8a03e2ad46 |
+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__ = '0.0.11'
|
__version__ = '0.0.13'
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
"""CLI wrapper for running QMK commands.
|
"""CLI wrapper for running QMK commands.
|
||||||
|
|
||||||
This program can be run from anywhere, with or without a qmk_firmware checkout. It provides a small set of subcommands for working with QMK and otherwise dispatches to the `qmk_firmware/bin/qmk` script for the repo you are currently in, or your default repo if you are not currently in a qmk_firmware checkout.
|
This program can be run from anywhere, with or without a qmk_firmware repository. If a qmk_firmware repository can be located we will use that to augment our available subcommands.
|
||||||
|
|
||||||
FIXME(skullydazed/anyone): --help shows underscores where we want dashes in subcommands (EG json_keymap instead of json-keymap)
|
FIXME(skullydazed/anyone): --help shows underscores where we want dashes in subcommands (EG json_keymap instead of json-keymap)
|
||||||
TODO(skullydazed/anyone): Need a way to filter some subcommands from --help (EG `qmk subcommands`)
|
TODO(skullydazed/anyone): Need a way to filter some subcommands from --help (EG `qmk hello`)
|
||||||
"""
|
"""
|
||||||
import argparse
|
import argparse
|
||||||
import os
|
import os
|
||||||
@@ -61,20 +61,18 @@ def find_qmk_firmware():
|
|||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
"""Dispatch the CLI subcommand to the proper place.
|
"""Setup the environment before dispatching to the entrypoint.
|
||||||
|
|
||||||
We first check to see if the subcommand was provided by the global `qmk`. If it was we import that module and hand control over to the entrypoint.
|
|
||||||
|
|
||||||
All other subcommands are dispatched to the local `qmk`, either the one we are currently in or whatever the user's default qmk_firmware is.
|
|
||||||
"""
|
"""
|
||||||
# Environment setup
|
# Environment setup
|
||||||
qmk_firmware = find_qmk_firmware()
|
qmk_firmware = find_qmk_firmware()
|
||||||
os.environ['QMK_HOME'] = str(qmk_firmware)
|
os.environ['QMK_HOME'] = str(qmk_firmware)
|
||||||
|
os.environ['ORIG_CWD'] = os.getcwd()
|
||||||
|
|
||||||
# Import the subcommand modules
|
# Import the subcommand modules
|
||||||
import qmk_cli.subcommands
|
import qmk_cli.subcommands
|
||||||
|
|
||||||
if qmk_firmware.exists():
|
if qmk_firmware.exists():
|
||||||
|
os.chdir(str(qmk_firmware))
|
||||||
sys.path.append(str(qmk_firmware / 'lib' / 'python'))
|
sys.path.append(str(qmk_firmware / 'lib' / 'python'))
|
||||||
import qmk.cli
|
import qmk.cli
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
[bumpversion]
|
[bumpversion]
|
||||||
current_version = 0.0.11
|
current_version = 0.0.13
|
||||||
commit = True
|
commit = True
|
||||||
tag = True
|
tag = True
|
||||||
tag_name = {new_version}
|
tag_name = {new_version}
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ if __name__ == "__main__":
|
|||||||
long_description=open('README.md').read(),
|
long_description=open('README.md').read(),
|
||||||
long_description_content_type="text/markdown",
|
long_description_content_type="text/markdown",
|
||||||
packages=find_packages(),
|
packages=find_packages(),
|
||||||
|
py_modules = ['milc'],
|
||||||
classifiers=[
|
classifiers=[
|
||||||
'Development Status :: 3 - Alpha',
|
'Development Status :: 3 - Alpha',
|
||||||
'Environment :: Console',
|
'Environment :: Console',
|
||||||
|
|||||||
Reference in New Issue
Block a user