Hi Stuart, thank you very much for your investigation and patch!
I must however say that I do not fully understand the bug and also not your solution:
Your approach is (if I understand yoour execute_after_dh_auto_install correctly) not to rebuild the libcasa_python lib for each Python version, but to copy it and then patch the right soname into. This works only if the libs would be ABI compatible. However, if usr/lib/<arch>/libcasa_python3.so.9 is ABI compatible between Python versions, why can't we just keep using this name and a single library?
If there is an ABI incompatibility, we would in any case need to do something else (like limiting to only one Python version), right?
Best Ole

