I have also resorted to manually installing the wheel to a temporary directory in %build,
then setting PYTHONPATH to include the temporary directory to build the documentation. I
don’t like this solution very well either, but it is a third alternative that seems to
work well. See
https://src.fedoraproject.org/rpms/python-asyncpg/blob/ca0bedc42ddba790ff...
for an example.