Compare commits
19 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 12242d94c2 | |||
| 19336ff9ee | |||
| 8e1de74918 | |||
| 137ed60056 | |||
| d320265936 | |||
| 97346a44bc | |||
| 1e0b08250d | |||
| 6a928e9322 | |||
| 5315431058 | |||
| aa11928c03 | |||
| 369c3e150a | |||
| c4e82e0740 | |||
| 95152b6f7f | |||
| 3bd1a79bfa | |||
| 42fcfc3930 | |||
| 60f2bb743d | |||
| f8902bd258 | |||
| f7125127f1 | |||
| f8fe363999 |
@@ -0,0 +1,12 @@
|
|||||||
|
[bumpversion]
|
||||||
|
current_version = 0.4.0
|
||||||
|
commit = True
|
||||||
|
tag = True
|
||||||
|
tag_name = {new_version}
|
||||||
|
message = New release: {current_version} → {new_version}
|
||||||
|
|
||||||
|
[bumpversion:file:.bumpversion.cfg]
|
||||||
|
|
||||||
|
[bumpversion:file:qmk_cli/__init__.py]
|
||||||
|
|
||||||
|
[bumpversion:file:setup.cfg]
|
||||||
@@ -44,14 +44,13 @@ jobs:
|
|||||||
- name: (MSYS2) Install Python dependencies
|
- name: (MSYS2) Install Python dependencies
|
||||||
shell: msys2 {0}
|
shell: msys2 {0}
|
||||||
run: |
|
run: |
|
||||||
python3 -m pip install wheel
|
python3 -m pip install -U setuptools wheel
|
||||||
- name: (MSYS2) Install QMK CLI from source
|
- name: (MSYS2) Install QMK CLI from source
|
||||||
shell: msys2 {0}
|
shell: msys2 {0}
|
||||||
run: |
|
run: |
|
||||||
python3 -m pip install -r requirements.txt
|
python3 -m pip install -U build
|
||||||
python3 setup.py sdist bdist_wheel
|
python3 -m build
|
||||||
cd ..
|
python3 -m pip install dist/qmk-*.tar.gz
|
||||||
python3 -m pip install --force-reinstall --no-index --no-deps --find-links qmk_cli/dist qmk
|
|
||||||
- name: (MSYS2) Run qmk setup -y
|
- name: (MSYS2) Run qmk setup -y
|
||||||
shell: msys2 {0}
|
shell: msys2 {0}
|
||||||
run: qmk setup -y
|
run: qmk setup -y
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ jobs:
|
|||||||
run: ./ci_tests
|
run: ./ci_tests
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
python -m pip install --upgrade pip
|
python3 -m pip install --upgrade pip
|
||||||
pip install setuptools wheel
|
pip install setuptools wheel
|
||||||
pip install -r requirements-dev.txt
|
pip install -r requirements-dev.txt
|
||||||
- name: Bump version
|
- name: Bump version
|
||||||
@@ -45,7 +45,7 @@ jobs:
|
|||||||
TWINE_USERNAME: qmk
|
TWINE_USERNAME: qmk
|
||||||
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
|
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
|
||||||
run: |
|
run: |
|
||||||
python setup.py sdist bdist_wheel
|
python3 -m build
|
||||||
twine upload dist/*
|
twine upload dist/*
|
||||||
- name: Log in to Docker Hub
|
- name: Log in to Docker Hub
|
||||||
uses: docker/login-action@v1.10.0
|
uses: docker/login-action@v1.10.0
|
||||||
@@ -58,3 +58,7 @@ jobs:
|
|||||||
context: .
|
context: .
|
||||||
push: true
|
push: true
|
||||||
tags: qmkfm/qmk_cli:latest
|
tags: qmkfm/qmk_cli:latest
|
||||||
|
- name: Trigger OS package builds
|
||||||
|
run: ./trigger_packages
|
||||||
|
env:
|
||||||
|
QMK_BOT_TOKEN: ${{ secrets.QMK_BOT_TOKEN }}
|
||||||
|
|||||||
@@ -17,9 +17,43 @@ A program to help users work with [QMK Firmware](https://qmk.fm/).
|
|||||||
* `qmk lint`
|
* `qmk lint`
|
||||||
* ...and many more!
|
* ...and many more!
|
||||||
|
|
||||||
|
# Packages
|
||||||
|
|
||||||
|
We provide "install and go" packages for many Operating Systems.
|
||||||
|
|
||||||
|
## Linux
|
||||||
|
|
||||||
|
Packages for several distributions available here: https://github.com/qmk/qmk_fpm
|
||||||
|
|
||||||
|
## macOS
|
||||||
|
|
||||||
|
Using [Homebrew](https://brew.sh):
|
||||||
|
|
||||||
|
brew install qmk/qmk/qmk
|
||||||
|
|
||||||
|
## Windows
|
||||||
|
|
||||||
|
Download our custom MSYS2 installer here: https://msys.qmk.fm/
|
||||||
|
|
||||||
# Quickstart
|
# Quickstart
|
||||||
|
|
||||||
* `python3 -m pip install qmk`
|
* `python3 -m pip install qmk`
|
||||||
* `qmk setup`
|
* `qmk setup`
|
||||||
|
|
||||||
|
# Building
|
||||||
|
|
||||||
|
We follow PEP517, you can install using [build](https://pypi.org/project/build/):
|
||||||
|
|
||||||
|
Setup:
|
||||||
|
|
||||||
|
python3 -m pip install build
|
||||||
|
|
||||||
|
Build:
|
||||||
|
|
||||||
|
python3 -m build
|
||||||
|
|
||||||
|
You can read more about working with PEP517 packages in the [Python Packaging User Guide](https://packaging.python.org/guides/distributing-packages-using-setuptools/#packaging-your-project).
|
||||||
|
|
||||||
|
# Documentation
|
||||||
|
|
||||||
Full documentation: <https://docs.qmk.fm/#/tutorial>
|
Full documentation: <https://docs.qmk.fm/#/tutorial>
|
||||||
|
|||||||
@@ -0,0 +1,6 @@
|
|||||||
|
[build-system]
|
||||||
|
requires = [
|
||||||
|
"setuptools>=42",
|
||||||
|
"wheel"
|
||||||
|
]
|
||||||
|
build-backend = "setuptools.build_meta"
|
||||||
+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.3.0'
|
__version__ = '0.4.0'
|
||||||
|
|||||||
@@ -48,10 +48,11 @@ KNOWN_BOOTLOADERS = {
|
|||||||
('239A', '000C'): 'caterina: Adafruit Feather 32U4',
|
('239A', '000C'): 'caterina: Adafruit Feather 32U4',
|
||||||
('239A', '000D'): 'caterina: Adafruit ItsyBitsy 32U4 3v',
|
('239A', '000D'): 'caterina: Adafruit ItsyBitsy 32U4 3v',
|
||||||
('239A', '000E'): 'caterina: Adafruit ItsyBitsy 32U4 5v',
|
('239A', '000E'): 'caterina: Adafruit ItsyBitsy 32U4 5v',
|
||||||
('239A', '000E'): 'caterina: Adafruit ItsyBitsy 32U4 5v',
|
|
||||||
('2A03', '0036'): 'caterina: Arduino Leonardo',
|
('2A03', '0036'): 'caterina: Arduino Leonardo',
|
||||||
('2A03', '0037'): 'caterina: Arduino Micro',
|
('2A03', '0037'): 'caterina: Arduino Micro',
|
||||||
('314B', '0106'): 'apm32-dfu: APM32 DFU ISP Mode'
|
('314B', '0106'): 'apm32-dfu: APM32 DFU ISP Mode',
|
||||||
|
('03EB', '2067'): 'qmk-hid: HID Bootloader',
|
||||||
|
('03EB', '2045'): 'lufa-ms: LUFA Mass Storage Bootloader'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+4
-29
@@ -1,29 +1,4 @@
|
|||||||
bleach==4.0.0
|
build
|
||||||
bump2version==1.0.1
|
bumpversion
|
||||||
bumpversion==0.6.0
|
requests
|
||||||
certifi==2021.5.30
|
twine
|
||||||
cffi==1.14.6
|
|
||||||
chardet==4.0.0
|
|
||||||
colorama==0.4.4
|
|
||||||
cryptography==3.4.7
|
|
||||||
docutils==0.17.1
|
|
||||||
idna==2.10
|
|
||||||
importlib-metadata==4.6.3
|
|
||||||
jeepney==0.7.1
|
|
||||||
keyring==23.0.1
|
|
||||||
packaging==21.0
|
|
||||||
pkginfo==1.7.1
|
|
||||||
pycparser==2.20
|
|
||||||
Pygments==2.9.0
|
|
||||||
pyparsing==2.4.7
|
|
||||||
readme-renderer==29.0
|
|
||||||
requests==2.26.0
|
|
||||||
requests-toolbelt==0.9.1
|
|
||||||
rfc3986==1.5.0
|
|
||||||
SecretStorage==3.3.1
|
|
||||||
six==1.16.0
|
|
||||||
tqdm==4.62.0
|
|
||||||
twine==3.4.2
|
|
||||||
urllib3==1.26.6
|
|
||||||
webencodings==0.5.1
|
|
||||||
zipp==3.5.0
|
|
||||||
|
|||||||
@@ -1,13 +1,5 @@
|
|||||||
[bumpversion]
|
#[bumpversion]
|
||||||
current_version = 0.3.0
|
# Bumpversion config has been moved to .bumpversion.cfg
|
||||||
commit = True
|
|
||||||
tag = True
|
|
||||||
tag_name = {new_version}
|
|
||||||
message = New release: {current_version} → {new_version}
|
|
||||||
|
|
||||||
[bumpversion:file:qmk_cli/__init__.py]
|
|
||||||
|
|
||||||
[bumpversion:file:setup.cfg]
|
|
||||||
|
|
||||||
[bdist_wheel]
|
[bdist_wheel]
|
||||||
universal = 1
|
universal = 1
|
||||||
@@ -16,17 +8,49 @@ universal = 1
|
|||||||
ignore = E501,E226
|
ignore = E501,E226
|
||||||
|
|
||||||
[metadata]
|
[metadata]
|
||||||
|
name = qmk
|
||||||
|
version = 0.4.0
|
||||||
author = skullydazed
|
author = skullydazed
|
||||||
author-email = skullydazed@gmail.com
|
author_email = skullydazed@gmail.com
|
||||||
description-file = README.md
|
description = A program to help users work with QMK Firmware.
|
||||||
dist-name = qmk
|
long_description = file: README.md
|
||||||
license_file = LICENSE
|
long_description_content_type = text/markdown
|
||||||
module = qmk_cli
|
license = MIT License
|
||||||
home-page = https://github.com/qmk/qmk_cli
|
project_urls =
|
||||||
requires-python = >=3.7
|
Bug Tracker = https://github.com/qmk/qmk_cli/issues
|
||||||
|
Documentation = https://docs.qmk.fm/#/cli
|
||||||
|
Homepage = https://qmk.fm/
|
||||||
|
Source = https://github.com/qmk/qmk_cli/
|
||||||
|
classifiers =
|
||||||
|
Development Status :: 3 - Alpha
|
||||||
|
Environment :: Console
|
||||||
|
Intended Audience :: Developers
|
||||||
|
Intended Audience :: System Administrators
|
||||||
|
Intended Audience :: End Users/Desktop
|
||||||
|
License :: OSI Approved :: MIT License
|
||||||
|
Natural Language :: English
|
||||||
|
Programming Language :: Python :: 3 :: Only
|
||||||
|
Topic :: Scientific/Engineering
|
||||||
|
Topic :: Software Development
|
||||||
|
Topic :: Utilities
|
||||||
|
|
||||||
[entry_points]
|
[options]
|
||||||
qmk = qmk_cli.script_qmk:main
|
install_requires =
|
||||||
|
hid
|
||||||
|
milc>=1.4.2
|
||||||
|
pyusb
|
||||||
|
setuptools>=45
|
||||||
|
# qmk_firmware packages
|
||||||
|
hjson
|
||||||
|
jsonschema>=3
|
||||||
|
pygments
|
||||||
|
qmk-dotty-dict
|
||||||
|
packages = find:
|
||||||
|
python_requiures = >=3.7
|
||||||
|
|
||||||
|
[options.entry_points]
|
||||||
|
console_scripts =
|
||||||
|
qmk = qmk_cli.script_qmk:main
|
||||||
|
|
||||||
[yapf]
|
[yapf]
|
||||||
align_closing_bracket_with_visual_indent = True
|
align_closing_bracket_with_visual_indent = True
|
||||||
|
|||||||
@@ -1,69 +0,0 @@
|
|||||||
from configparser import ConfigParser
|
|
||||||
from setuptools import setup, find_packages
|
|
||||||
|
|
||||||
setup_cfg = ConfigParser()
|
|
||||||
setup_cfg.read('setup.cfg')
|
|
||||||
metadata = setup_cfg['metadata']
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
|
||||||
with open('README.md', encoding='utf-8') as readme_file:
|
|
||||||
long_description = readme_file.read()
|
|
||||||
setup(
|
|
||||||
name=metadata['dist-name'],
|
|
||||||
description='A program to help users work with QMK Firmware.',
|
|
||||||
entry_points={
|
|
||||||
'console_scripts': ['%s = %s' % i for i in setup_cfg['entry_points'].items()],
|
|
||||||
},
|
|
||||||
license='MIT License',
|
|
||||||
url=metadata['home-page'],
|
|
||||||
version=setup_cfg['bumpversion']['current_version'],
|
|
||||||
author=metadata['author'],
|
|
||||||
author_email=metadata['author-email'],
|
|
||||||
maintainer=metadata['author'],
|
|
||||||
maintainer_email=metadata['author-email'],
|
|
||||||
long_description=long_description,
|
|
||||||
long_description_content_type="text/markdown",
|
|
||||||
packages=find_packages(),
|
|
||||||
py_modules=['qmk_cli'],
|
|
||||||
classifiers=[
|
|
||||||
'Development Status :: 3 - Alpha',
|
|
||||||
'Environment :: Console',
|
|
||||||
'Intended Audience :: Developers',
|
|
||||||
'Intended Audience :: System Administrators',
|
|
||||||
'Intended Audience :: End Users/Desktop',
|
|
||||||
'License :: OSI Approved :: MIT License',
|
|
||||||
'Natural Language :: English',
|
|
||||||
'Programming Language :: Python :: 3 :: Only',
|
|
||||||
'Topic :: Scientific/Engineering',
|
|
||||||
'Topic :: Software Development',
|
|
||||||
'Topic :: Utilities',
|
|
||||||
],
|
|
||||||
python_requires=metadata['requires-python'],
|
|
||||||
install_requires=[
|
|
||||||
"appdirs==1.4.4",
|
|
||||||
"argcomplete==1.12.3",
|
|
||||||
"attrs==21.2.0",
|
|
||||||
"colorama==0.4.4",
|
|
||||||
"coverage==5.5",
|
|
||||||
"qmk-dotty-dict==1.3.0.post1",
|
|
||||||
"flake8==3.9.2",
|
|
||||||
"halo==0.0.31",
|
|
||||||
"hid==1.0.4",
|
|
||||||
"hjson==3.0.2",
|
|
||||||
"jsonschema==3.2.0",
|
|
||||||
"log-symbols==0.0.14",
|
|
||||||
"mccabe==0.6.1",
|
|
||||||
"milc==1.5.0",
|
|
||||||
"nose2==0.10.0",
|
|
||||||
"pycodestyle==2.7.0",
|
|
||||||
"pyflakes==2.3.1",
|
|
||||||
"Pygments==2.9.0",
|
|
||||||
"pyrsistent==0.18.0",
|
|
||||||
"pyusb==1.2.1",
|
|
||||||
"setuptools>=45",
|
|
||||||
"six==1.16.0",
|
|
||||||
"spinners==0.0.24",
|
|
||||||
"termcolor==1.1.0",
|
|
||||||
"yapf==0.31.0"
|
|
||||||
]
|
|
||||||
)
|
|
||||||
Executable
+29
@@ -0,0 +1,29 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
"""Trigger workflows that build QMK packages.
|
||||||
|
"""
|
||||||
|
from os import environ
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
|
import requests
|
||||||
|
|
||||||
|
# Pull in environment vars
|
||||||
|
gh_user = environ.get('GH_USERNAME', 'qmk-bot')
|
||||||
|
gh_pat = environ.get('QMK_BOT_TOKEN', '')
|
||||||
|
gh_repo_owner = environ.get('REPO_OWNER', 'qmk')
|
||||||
|
gh_repo_name = environ.get('REPO_NAME', 'qmk_fpm')
|
||||||
|
gh_ref = environ.get('BRANCH_NAME', 'main')
|
||||||
|
gh_workflow_ids = environ.get('WORKFLOW_IDS', 'debian-buster-publish.yml,fedora-32-publish.yml,ubuntu-focal-publish.yml').split(',')
|
||||||
|
gh_api_url = environ.get('GITHUB_API_URL', 'https://api.github.com')
|
||||||
|
gh_workflow_args = {'ref': gh_ref}
|
||||||
|
gh_workflow_headers = {'Accept': 'application/vnd.github.v3+json'}
|
||||||
|
|
||||||
|
for gh_workflow_id in gh_workflow_ids:
|
||||||
|
gh_workflow_endpoint = f'{gh_api_url}/repos/{gh_repo_owner}/{gh_repo_name}/actions/workflows/{gh_workflow_id}/dispatches'
|
||||||
|
print(f'Triggering {gh_workflow_id} workflow at: {gh_workflow_endpoint}')
|
||||||
|
workflow_dispatch = requests.post(gh_workflow_endpoint, headers=gh_workflow_headers, json=gh_workflow_args, auth=(gh_user, gh_pat))
|
||||||
|
if workflow_dispatch.status_code != 204:
|
||||||
|
print(f'Error from GitHub API, status_code {workflow_dispatch.status_code}!')
|
||||||
|
print(workflow_dispatch.text)
|
||||||
|
exit(1)
|
||||||
|
|
||||||
|
exit(0)
|
||||||
Reference in New Issue
Block a user