gitlab.com/thomasboni/go-enry/v2@v2.8.3-0.20220418031202-30b0d7a3de98/python/README.md (about)

     1  # Python bindings for enry
     2  
     3  Python bindings through cFFI (API, out-of-line) for calling enry Go functions exposed by CGo wrapper.
     4  
     5  ## Build
     6  
     7  ```
     8  $ pushd .. && make static && popd
     9  $ pip install -r requirements.txt
    10  $ python build_enry.py
    11  ```
    12  
    13  Will build a static library for Cgo wrapper `libenry`, then generate and build `enry.c` - a CPython extension that provides actual bindings.
    14  
    15  ## Run
    16  
    17  Example for single exposed API function is provided.
    18  
    19  ```
    20  $ python enry.py
    21  ```
    22  
    23  ## TODOs
    24   - [x] helpers for sending/receiving Go slices to C
    25   - [x] read `libenry.h` and generate `ffibuilder.cdef(...)` content
    26   - [x] cover the rest of enry API
    27   - [x] add `setup.py`
    28   - [ ] build/release automation on CI (publish on pypi)
    29   - [ ] try ABI mode, to avoid dependency on C compiler on install (+perf test?)