cad73c2 Be more careful when loading the macros from sources

Authored and Committed by churchyard 2 years ago
    Be more careful when loading the macros from sources
    
    The %{?load:%{SOURCE102}} construct no longer works in RPM 4.17+
    
    Currently, we:
    
    1. Load %{SOURCE102} if it exists.
       This should always be the case when actually building the RPM or SRPM package.
    
    2. Else, load macros.python-srpm if it exists.
       This is the case when something parses the spec from dist-git without setting
       %_sourcedir to the current working directory. E.g. rpmdev-bumpspec does this.
    
    3. Else, don't load anything, get %{__default_python3_version} from the environment.
       This is the case when something parses the spec in isolation.
       Getting the version from sources is impossible, because the sources are missing.
       So we get the installed version instead. Note that this will blow up on Fedora < 33,
       but it already did before.
    
        
file modified
+8 -1