Python3_add_library doesn’t get defined unless the “Development” component is requested in find_package, but “Development” will fail to be defined if libpython*.so is not present. For example, the manylinux project docker images don’t have the libpython shared objects or python development packages.
However, it is completely possible to create valid python extensions without libpython*.so. I can set Python3_LIBRARY to something invalid and it will build perfectly fine. I can look at all the resulting makefiles from a successful build and there’s no usage of libpython*.so. Is there a way I can force Python3_add_library to be defined without searching for the “development” component?