tartrazine/python/README.md
Roberto Alsina f955c625ad Squashed 'go-enry/' content from commit 7e3a9a7
git-subtree-dir: go-enry
git-subtree-split: 7e3a9a7241b14559854ad041e73d5203a6d3272c
2024-09-04 16:33:41 -03:00

792 B

Python bindings for enry

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

Build

$ pushd .. && make static && popd
$ pip install -r requirements.txt
$ 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?)