hpy icon indicating copy to clipboard operation
hpy copied to clipboard

Integration into projects that embed Python and use cmake

Open KubaO opened this issue 1 year ago • 2 comments

I'm working on a proof-of-concept for using HPy as a Python API inside of the open-source Electronic Design Automation (EDA) project KiCad. KiCad embeds Python, and uses it to allow application scripting. I'm looking for ways to make KiCad's binding to Python more universal, so that other implementations could be used in place of CPython. At the moment this is just to see if it's feasible.

Since KiCad embeds Python, it makes most sense to use it as a static library. KiCad uses cmake as a build system. I've added a CmakeLists.txt to our copy of HPy, so that it can be built together with everything else.

Would the HPy project consider having a maintained CMakeLists.txt at the root folder worthwhile? This would make it easy to drop HPy sources into a project and have them built. Only a ctx library would be built, since that would be the common use case I believe.

Would such a CMakeLists.txt and any needed CI stuff for it be accepted as a contribution to HPy?

This is the other side of the coin mentioned in #370

KubaO avatar Jun 19 '23 23:06 KubaO