xo-umbrella2/xo-pyutil/example/ex1/pyutilexample.hpp.in
Roland Conybeare 2b87e58d1e git subrepo clone git@github.com:Rconybea/xo-pyutil.git xo-pyutil
subrepo:
  subdir:   "xo-pyutil"
  merged:   "dfd5229b"
upstream:
  origin:   "git@github.com:Rconybea/xo-pyutil.git"
  branch:   "main"
  commit:   "dfd5229b"
git-subrepo:
  version:  "0.4.9"
  origin:   "???"
  commit:   "???"
2026-06-06 22:31:02 -04:00

21 lines
552 B
C++

/* @file pyutilexample.hpp */
/* python requires module name = library name
* example:
* PYBIND11_MODULE(XO_PYUTILEXAMPLE_MODULE_NAME(), m) { ... }
*/
#define XO_PYUTILEXAMPLE_MODULE_NAME() @SELF_LIB@
/* example:
* py::module_::import(XO_PYUTILEXAMPLE_MODULE_NAME_STR)
*/
#define XO_PYUTILEXAMPLE_MODULE_NAME_STR "@SELF_LIB@"
/* example:
* XO_PYUTILEXAMPLE_IMPORT_MODULE()
* replaces
* py::module_::import("xo_pyexpression")
*/
#define XO_PYUTILEXAMPLE_IMPORT_MODULE() py::module_::import("@SELF_LIB@")
/* end pyutilexample.hpp */