KiCad packaging hatch plugin

Hello, I recently discovered hatch which I started using in my addon. Due to it’s plugin based architecture it has been possible to extract my specific build scripts to dedicated project which can be reused by other plugins. So here it is: GitHub - adamws/hatch-kicad: Hatch plugin to build KiCad addon packages
It consist two ‘modules’, first is the builder which prepares zip package. Second is post-builder-hook which prepares custom repository. I use this hook to host dev builds on github pages.

I also prepared minimal template project to show how it can be used: GitHub - adamws/kicad-plugin-template: Project template for KiCad action plugin

Because this is hatch based, it is quite extensible - for more complex projects you can add more custom hooks. For example, I use a hook which generates translation files before zip packaging.

Overall, this is small ‘convenience’ utility. Nothing groundbreaking but should make the dev process a little bit easier. I encourage new projects to check it out.

I never heard of this “hatch” thing, and it is not clear from your description what it is. Can you rewrite your post to add a few lines to describe what this “hatch” thing does?

It is tool for packaging python projects - you can create (and publish to pypi) source/binary distributions with it so others can install it with tools like pip. KiCad plugins are little bit different in that regard and are not installable with pip and follow its own expected plugin format - this plugin bridges the gap - it takes pyproject.toml and add new builder (kicad specific one) which builds plugin zip archives according to kicad spec. Having it all in one place makes things more organized. For example, I publish to pypi kbplacer · PyPI (plugin has some standalone capabilities) and to KiCad PCM, using one project file: (publishing to KiCad’s PCM is not automated but file preparation is)


This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.