7#ifdef PXR_BASE_TF_PY_MODULE_H
8#error This file should only be included once in any given source (.cpp) file.
10#define PXR_BASE_TF_PY_MODULE_H
15#include "pxr/base/tf/api.h"
16#include "pxr/base/tf/preprocessorUtilsLite.h"
18#include "pxr/external/boost/python/module.hpp"
32static void WrapModule();
34PXR_NAMESPACE_OPEN_SCOPE
37void Tf_PyInitWrapModule(
void (*wrapModule)(),
38 const char* packageModule,
39 const char* packageName,
40 const char* packageTag,
41 const char* packageTag2);
44void TF_PP_CAT(init_module_, MFB_PACKAGE_NAME)() {
48 TF_PP_STRINGIZE(MFB_PACKAGE_MODULE),
49 TF_PP_STRINGIZE(MFB_ALT_PACKAGE_NAME),
50 "Wrap " TF_PP_STRINGIZE(MFB_ALT_PACKAGE_NAME),
51 TF_PP_STRINGIZE(MFB_PACKAGE_NAME)
55PXR_NAMESPACE_CLOSE_SCOPE
68PyObject* TF_PP_CAT(PyInit__, MFB_PACKAGE_NAME)() {
70 static struct PyModuleDef moduledef = {
71 PyModuleDef_HEAD_INIT,
72 TF_PP_STRINGIZE(TF_PP_CAT(_, MFB_PACKAGE_NAME)),
82 PXR_NAMESPACE_USING_DIRECTIVE
83 return pxr_boost::python::detail::init_module(moduledef,
84 TF_PP_CAT(init_module_, MFB_PACKAGE_NAME));
101PyObject* TF_PP_CAT(PyInit_lib, MFB_PACKAGE_NAME)() {
103 static struct PyModuleDef moduledef = {
104 PyModuleDef_HEAD_INIT,
105 TF_PP_STRINGIZE(TF_PP_CAT(lib, MFB_PACKAGE_NAME)),
115 PXR_NAMESPACE_USING_DIRECTIVE
116 return pxr_boost::python::detail::init_module(moduledef,
117 TF_PP_CAT(init_module_, MFB_PACKAGE_NAME));
121#define TF_WRAP_MODULE static void WrapModule()
124#define TF_WRAP(x) ARCH_HIDDEN void wrap ## x (); wrap ## x ()
Define function attributes.