For better readability and in order to not diverge from the CMake implementation can you please change the line 243-245 to:

    python_version_xdoty = str(sys.version_info[0]) + '.' + str(sys.version_info[1]
    if python_use_debian_layout and sys.version_info[0] == 3:
        python_version_xdoty = str(sys.version_info[0])