Python version for Soapy build

I build SoapySDR from source and although I have both Python 3.11 and 3.6 on my system, SoapySDR builds for Python3.6. Is there a clean and simple way to specify (like a cmake flag) the python version to build with?