Sphinx: improve version detection for SDists

John Snow requested to merge jsnow/python-qemu-qmp:doc-version-fix into main

When building docs from SDist files, we won't have git metadata available. Use any tools we may have at our disposal to determine the package version when possible in these cases.

Note: this patch avoids trying to blindly import "qemu.qmp" in just such a case that the user's environment already has such a package installed: we want to query specifically the version from the unpackaged source files.

Fixes #27 (closed)

Merge request reports