Sketchy and maybe crazy alternative to PEP 722

See Projects that aren't meant to generate a wheel and `pyproject.toml` for the discussion of using pyproject.toml for projects which are not meant to build a wheel. I suspect you will need to see that conversation resolved in a way that makes pyproject.toml work for that scenario before you can try and generalize it as the format to use regardless of whether it’s stored as a separate file or embedded in a .py file.