PYTHON2_VERSION needs to be visible across sections, and it's awkward to define it twice. Just make it a macro. %global expands once only. PYTHON3_* technically doesn't need this, but let's be consistent.