xo-umbrella2/xo-pyfacet
2026-09-20 11:47:09 -04:00
..
cmake xo-pyfacet: ++ facet python bindings [PYBIND] 2026-09-06 17:57:02 -04:00
examples move python extensions into xo namespace [REFACTOR] 2026-09-13 11:51:33 -04:00
src/pyfacet xo-facet: AllocFlywheel -> namespace xo::facet [TIDY] 2026-09-20 11:47:09 -04:00
.gitignore xo-pyfacet: ++ facet python bindings [PYBIND] 2026-09-06 17:57:02 -04:00
CMakeLists.txt standalone pybind subsystems make xo-python [PYBIND] [BUILD] 2026-09-07 19:46:43 -04:00
README.md move python extensions into xo namespace [REFACTOR] 2026-09-13 11:51:33 -04:00

python bindings for c++ faceted object model (xo-facet)

Exposes xo-facet -- the faceted object model (fomo) -- to python. The interesting surface here is the handle machinery: python needs to hold fomo objects across a gc cycle, which is what DHandleStore and ObjectHandle exist to make possible.

Status: scaffold. The module builds, imports and links against xo_facet, but binds nothing yet.

Getting Started

build + install dependencies

build + install

$ cd xo-pyfacet
$ mkdir build
$ cd build
$ INSTALL_PREFIX=/usr/local  # or wherever you prefer, e.g. ~/local
$ cmake \
    -DCMAKE_MODULE_PATH=${INSTALL_PREFIX}/share/cmake \
    -DCMAKE_PREFIX_PATH=${INSTALL_PREFIX} \
    -DCMAKE_INSTALL_PREFIX=${INSTALL_PREFIX} ..
$ make
$ make install

Examples

Assumes xo-pyfacet installed to ~/local2/lib/python

PYTHONPATH=~/local2/lib/python:$PYTHONPATH python
>>> import xo.facet
>>> dir(xo.facet)
['__doc__', '__file__', '__loader__', '__name__', '__package__', '__spec__']
>>>