The regex was broken for two+ digit minor version.
Providing python(abi) = 3.10 confuses the dependency resolution in the
Python 3.10 testing copr.
E.g. python3-sphinx requires `python(abi) = 3.10` and `/usr/bin/python3`.
In certain circumstances, dnf installs python3 and python3.10 from rawhide,
satisfying both of the dependencies.
Running `sphinx-build` hence ends up with:
Traceback (most recent call last):
File "/usr/bin/sphinx-build", line 5, in <module>
from sphinx.cmd.build import main
ModuleNotFoundError: No module named 'sphinx'
The `dirname $0` breaks the script when it is linked to a different location,
for example the RHEL's /usr/libexec/platform-python-config.
The error handling was never reachable, failed exec ends the script.
See https://src.fedoraproject.org/rpms/python3.9/pull-request/38