Closed cho-m closed 1 year ago
While trying to migrate Homebrew formula to Python 3.11, I hit the following error:
/tmp/lcm-20221118-59422-1wlr2mm/lcm-1.4.0/lcm-python/module.c:46:34: error: expression is not assignable Py_TYPE(&pylcmeventlog_type) = &PyType_Type; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ /tmp/lcm-20221118-59422-1wlr2mm/lcm-1.4.0/lcm-python/module.c:47:26: error: expression is not assignable Py_TYPE(&pylcm_type) = &PyType_Type; ~~~~~~~~~~~~~~~~~~~~ ^ /tmp/lcm-20221118-59422-1wlr2mm/lcm-1.4.0/lcm-python/module.c:48:39: error: expression is not assignable Py_TYPE(&pylcm_subscription_type) = &PyType_Type; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ 3 errors generated. make[2]: *** [lcm-python/CMakeFiles/lcm-python.dir/module.c.o] Error 1
Added a fix used by other projects like:
boost
gobject-introspection
numpy
While trying to migrate Homebrew formula to Python 3.11, I hit the following error:
Added a fix used by other projects like:
boost
- https://github.com/boostorg/python/blob/develop/include/boost/python/detail/wrap_python.hpp#L232-L233gobject-introspection
- https://gitlab.gnome.org/GNOME/gobject-introspection/-/blob/main/giscanner/giscannermodule.c#L52-54numpy
- https://github.com/numpy/numpy/blob/main/numpy/core/include/numpy/npy_3kcompat.h#L90-L92