Consider using
https://src.fedoraproject.org/rpms/pyproject-rpm-macros and
generating the buildrequires from pyproject.toml (setuptools_scm is listed there).
Thanks, I tried pyproject-rpm-macros, but it seems that using %generate_buildrequires +
%pyproject_buildrequires and then %py_provides doesn't work.
I have no spare time at the moment to try to figure out what's wrong, so I simply
added setuptools_scm to BRs as you pointed out.
Mattia