The following CMake statement:
find_package(Python3 3.11 EXACT COMPONENTS Development Interpreter REQUIRED)
message("The extension suffix is: ${Python_SOABI}")
Produces:
The extension suffix is: cpython-312-x86_64-linux-gnu
The docs say about Python_SOABI:
Python_SOABI
Added in version 3.17.
Extension suffix for modules.
Information computed from sysconfig.get_config_var('EXT_SUFFIX') or sysconfig.get_config_var('SOABI') or python3-config --extension-suffix.
The SOABI is indeed was I get when I type python3-config --extension-suffix
in my terminal:
python3-config --extension-suffix
.cpython-312-x86_64-linux-gnu.so
I requested a different version however from find_package. Could the version obtained from find_package somehow be correlated with the SOABI version?