By Python CMake code do you just mean the entry in cmake.opts that can be simplified (should we maybe enable shared libraries by default too?) or some other code. Also the CI can be simplified by assuming a dune version >= 2.9.
I setup.py there is a brief description how to publish a new dumux package on PyPI. There is also the updated Dune documentation. We should create an updated package for the release. The pyproject.toml is generated in the process I think and should then be committed afterwards. (It's a strange procedure.)