cmake: Use LooseVersion for Python version comparison

This commit is contained in:
Martin Braun 2025-11-07 14:37:56 +01:00
parent e35f66e82f
commit addf11d743

View File

@ -313,7 +313,7 @@ include(UHDPython)
PYTHON_CHECK_MODULE(
"Python version ${PYTHON_MIN_VERSION} or greater"
"platform" "platform.python_version() >= '${PYTHON_MIN_VERSION}'"
"platform" "LooseVersion(platform.python_version()) >= LooseVersion('${PYTHON_MIN_VERSION}')"
HAVE_PYTHON_PLAT_MIN_VERSION
)