vendored mpi4py needs to be re-Cythonized in order to build with Python 3.12
VTK does not build with Python 3.12 due to its use of removed CPython APIs within the Cython-generated code for mpi4py.
See for example: https://github.com/cython/cython/issues/4788. (There are other issues with Python 3.12 as well.)
The fixes are in the latest version of Cython, but the source code for mpi4py included here (https://gitlab.kitware.com/vtk/vtk/-/tree/master/ThirdParty/mpi4py) needs to be re-generated so that it can build with Python 3.12.
This patch will fix the issues and allow it to build, but it should only be used as a temporary workaround: https://github.com/openPMD/openPMD-api/files/13773304/fix-mpi4py-cython-python3.12.patch
Edited by Ben Wibking