From 067f5077286b4f4f37fcf5fab8fb2f9900790369 Mon Sep 17 00:00:00 2001 From: Daniel Schaefer Date: Fri, 17 Nov 2023 06:29:43 -0800 Subject: [PATCH] python3: Package with pyproject/hatch Signed-off-by: Daniel Schaefer --- .github/workflows/ci.yml | 15 +++- .gitignore | 5 ++ README.md | 4 +- python/README.md | 14 ++++ python/pyproject.toml | 70 ++++++++++++++++++ python/qmk_hid/__init__.py | 0 .../__pycache__/uf2conv.cpython-311.pyc | Bin 0 -> 20828 bytes qmk_gui.py => python/qmk_hid/gui.py | 10 +-- uf2conv.py => python/qmk_hid/uf2conv.py | 0 requirements.txt | 2 +- 10 files changed, 111 insertions(+), 9 deletions(-) create mode 100644 python/README.md create mode 100644 python/pyproject.toml create mode 100644 python/qmk_hid/__init__.py create mode 100644 python/qmk_hid/__pycache__/uf2conv.cpython-311.pyc rename qmk_gui.py => python/qmk_hid/gui.py (99%) mode change 100755 => 100644 rename uf2conv.py => python/qmk_hid/uf2conv.py (100%) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 51e24e1..f064159 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -172,7 +172,20 @@ jobs: uses: JohnAZoidberg/pyinstaller-action@dont-clean with: python_ver: '3.11' - spec: qmk_gui.py + spec: python/qmk_hid/gui.py requirements: 'requirements.txt' upload_exe_with_name: 'qmk_gui.exe' options: --onefile, --name "qmk_gui", --windowed, --add-data "releases;releases" --icon=res/logo_cropped_transparent_keyboard_48x48.ico --add-data 'res;res' + + package-python: + name: Package Python + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v3 + + - run: | + cd python + python3 -m pip install --upgrade build + python3 -m pip install --upgrade hatch + python3 -m pip install --upgrade twine + python3 -m build diff --git a/.gitignore b/.gitignore index b699590..45e19bd 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,13 @@ target/ +# Python +__pycache__ venv/ # pyinstaller qmk_gui.spec build/ dist/ + +# Hatch +_version.py diff --git a/README.md b/README.md index 2e2b77c..e120254 100644 --- a/README.md +++ b/README.md @@ -10,8 +10,8 @@ Tested to work on Windows and Linux, without any drivers or admin privileges. ###### GUI There is also an easy to use GUI tool that does not require commandline interaction. -On Linux install Python requirements via `python3 -m install -r requirements.txt` and run `qmk_gui.py`. -On Windows download the `qmk_gui.exe` and run it. + +See [GUI README](python/README.md) ## Running diff --git a/python/README.md b/python/README.md new file mode 100644 index 0000000..aa28da1 --- /dev/null +++ b/python/README.md @@ -0,0 +1,14 @@ +# Python + +## Installing + +Pre-requisites: Python with pip + +```sh +python3 -m pip install qmk_hid +``` + +## GUI + +On Linux install Python requirements via `python3 -m install -r requirements.txt` and run `qmk_gui.py`. +On Windows download the `qmk_gui.exe` and run it. \ No newline at end of file diff --git a/python/pyproject.toml b/python/pyproject.toml new file mode 100644 index 0000000..dfd7fca --- /dev/null +++ b/python/pyproject.toml @@ -0,0 +1,70 @@ +[build-system] +requires = ["hatchling", "hatch-vcs"] +build-backend = "hatchling.build" + +[project] +name = "qmk_hid" +# TODO: Dynamic version from git (requires tags) +#dynamic = ["version"] +version = "0.1.8" +description = 'A GUI tool to control QMK keyboard, specifically of the Framework Laptop 16' +# TODO: Custom README for python project +readme = "README.md" +requires-python = ">=3.7" +license = { text = "MIT" } +keywords = [ + "hatch", +] +authors = [ + { name = "Daniel Schaefer", email = "dhs@frame.work" }, +] +classifiers = [ + "Development Status :: 4 - Beta", + "License :: OSI Approved :: MIT License", + "Programming Language :: Python :: 3", +] +dependencies = [ + "hidapi==0.14.0", + "PySimpleGUI==4.60.5", + "pywin32; os_name == 'nt'", +] + +[project.urls] +Issues = "https://github.com/FrameworkComputer/qmk_hid/issues" +Source = "https://github.com/FrameworkComputer/qmk_hid" + +# TODO: Figure out how to add a runnable-script +#[project.scripts] +#qmk_hid = "qmk_hid.gui:main_cli" + +[project.gui-scripts] +qmk_gui = "qmk_hid.gui:main" + +#[tool.hatch.version] +#source = "vcs" +# +#[tool.hatch.build.hooks.vcs] +#version-file = "qmk_hid/_version.py" + +[tool.hatch.build.targets.sdist] +exclude = [ + "/.github", +] + +# TODO: Maybe typing with mypy +# [tool.hatch.build.targets.wheel.hooks.mypyc] +# enable-by-default = false +# dependencies = ["hatch-mypyc>=0.14.1"] +# require-runtime-dependencies = true +# mypy-args = [ +# "--no-warn-unused-ignores", +# ] +# +# [tool.mypy] +# disallow_untyped_defs = false +# follow_imports = "normal" +# ignore_missing_imports = true +# pretty = true +# show_column_numbers = true +# warn_no_return = false +# warn_unused_ignores = true \ No newline at end of file diff --git a/python/qmk_hid/__init__.py b/python/qmk_hid/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/python/qmk_hid/__pycache__/uf2conv.cpython-311.pyc b/python/qmk_hid/__pycache__/uf2conv.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f5ac8242d3d0a8e76bb0a78a61f2e65c9c5119dd GIT binary patch literal 20828 zcmch9X>c27mRL8?xEnX`OW-9D5=rsYNgWgqk+MWt)-|KUEQk$?kSLJu26aF{%uKu! zNXspQE;@o|$b~c-MXLgfr7Q8~ChE=LcoQnRW=<-aJ*OjWt zdtc+|hA59*Nu>ckbbsIbzW$E)z4yNN-p4<+TFn$(f5V^kf3}OF{u@5zE+%{P<^O`4 zdlW};^fYx&{-w{+dAwB(mL$B)N2I%Cb&F;w*+S0P114^NUm zZ^biA9SfWu?lMnn;r8r_zv|OafsUC!Gl#9)N5_Vbk3(MjsqdV6MtLY|f=2x8rH5ZE z^W{8%dsIk~cO`$%(GiN%aN0l8R05WKsXG{@BQ&ST4do^TkmXLyH~@nwln>#XvzLr< zlJe@t!rH#kQ69Vf%!mNn;AJv;A;iy3gfjZM;H+=rYQ_N_8b8*5cywU=bR%mJ_ zn17s`?3$PfUT>ehmC*-;ad_nIP|a5O6ZQa@r`C+N1#8@&IGJ=NJCpAF-;s=)Q^w8n z{b>suJF(F7nY(e-(kNOEF4N2P51G$84z9Kw6q$oxLTU9R;9!wScnCN5C=&(44a2D% z?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>VYpDs9Ktmf~waFKtW? zFCTw&Q7U~URr(5~!}#6?YB%*Hdp_JvZpaD7(X_kleQjd+J z?Sav=_P|J4d!9n?`|yluL!vv`{DZzkAL#?BGr_Ie8$^3Ux(*IKzZZ-%OO~%bFWt0w zVd+9_7z@I%F{ZXP7Ag96a#&)wrPysE`F;*=3bZD~`4~AO1<20PtjO&*B@$=K0kLXWsKfJvRAF*t&AlVk$lnf47DK8%y#C3Pa@NV{ugIB$K*R?nNB+DqqII43i2T-R%85{poPMgt8~oCmJs zG+nh$Dc~iIk%kz)JSZtc1U2Yz(hwZ~Jop0Bep|@cyqSh0Now#a3XeMrlA-%7GBj>irPvz!#O|r T&xhX{o+lp=5KI*$lj-|EYUqj^ literal 0 HcmV?d00001 diff --git a/qmk_gui.py b/python/qmk_hid/gui.py old mode 100755 new mode 100644 similarity index 99% rename from qmk_gui.py rename to python/qmk_hid/gui.py index 719ca22..8d143d0 --- a/qmk_gui.py +++ b/python/qmk_hid/gui.py @@ -137,7 +137,10 @@ def get_numlock_state(): pass -def main(devices): +def main(): + devices = find_devs(show=False, verbose=False) + # print("Found {} devices".format(len(devices))) + device_checkboxes = [] for dev in devices: device_info = "{}\nSerial No: {}\nFW Version: {}\n".format( @@ -636,7 +639,4 @@ def flash_firmware(dev, fw_path): if __name__ == "__main__": - devices = find_devs(show=False, verbose=False) - print("Found {} devices".format(len(devices))) - - main(devices) + main() diff --git a/uf2conv.py b/python/qmk_hid/uf2conv.py similarity index 100% rename from uf2conv.py rename to python/qmk_hid/uf2conv.py diff --git a/requirements.txt b/requirements.txt index c07f057..cf8db53 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,3 @@ hidapi==0.14.0 PySimpleGUI==4.60.5 -pywin32 +pywin32; sys_platform = 'windows' \ No newline at end of file