I've been trying to wrap my head around modern Python packaging, and one of the things I still can't find anything clear about is how to do build-time codegen (so e.g. in-source data files get compiled to code file during build, and those code files get packaged in the sdist or wheel).
From what PEP517 seems to imply, I feel like it requires implementing a custom build backend:
[build-system]
build-backend = "local_backend"
backend-path = ["backend"]
and then that's supposed to do some things and delegate to some existing build backend for the actual bundling?
Are there examples available? I tried looking around, but most projects seem to use pyproject.toml in addition to setup.py, and I've yet to find one which uses pyproject.toml exclusively and has a non-trivial build step.
It also somewhat feels like there's a billion PEP517 build frontends which are also backends? Is that real or am I misunderstanding?