martmists
05/02/2022, 10:30 PMPiotr Krzemiński
05/06/2022, 5:55 AMmartmists
05/06/2022, 9:32 AMpackage somemodule
@PyExport
fun hello(target: String) {
println("Hello, $target!")
}
then simply run pip install .
in the root to install from setup.py, and then
>>> import somemodule
>>> somemodule.hello("world")
Hello, world!
should work. Most of the things you can do are shown in the kpy-sample directory (though not using the gradle plugin as gradle doesn't like having a sibling project as plugin)
Some things that I haven't fully worked out yet include registering custom type conversions, for example to only convert from/to numpy arrays. For now, only simple types and user-defined pyexports are able to be converted.Piotr Krzemiński
05/06/2022, 9:38 AM