It's frustrating (and confusing for new users) when linking in manylinux, as you need to allow-undefined at link time.
I think it would be better to create a linker script with EXTERNs for the exact symbols in libpython3.so for the target python version.
Happy to have a try at this, if it seems right!