go-enry/python
Alexander Bezzubov 35575d0a3e
py: expose highest-level enry.language()
Signed-off-by: Alexander Bezzubov <bzz@apache.org>
2020-04-24 20:51:46 +02:00
..
build_enry.py py: expose highest-level enry.language() 2020-04-24 20:51:46 +02:00
enry.py py: expose highest-level enry.language() 2020-04-24 20:51:46 +02:00
README.md py: expose highest-level enry.language() 2020-04-24 20:51:46 +02:00
requirements.txt python: add dependencies 2019-10-14 19:38:33 +02:00

Python bindings for enry

Python bindings through cFFI (API, out-of-line) for calling enry Go functions exposed by CGo wrapper.

Build

$ cd .. && make static
$ python build_enry.py

Will build a static library for Cgo wrapper libenry, then generate and build enry.c - a CPython extension that provides actual bindings.

Run

Example for single exposed API function is provided.

$ python enry.py

TODOs

  • helpers for sending/receiving Go slices to C
  • read libenry.h and generate ffibuilder.cdef(...) content
  • cover the rest of enry API
  • add setup.py
  • build/release automation on CI (publish on pypi)
  • try ABI mode, to avoid dependency on C compiler on install (+perf test?)