Is there a nice way to switch between 2 different packages providing the same APIs?
In the end I changed to a completely different approach.
I now have two parallel directories, one with PySide-based code and the other with auto-generated PyQt-based code. And I created a tiny script to copy the PySide code to the PyQt directory & do the necessary changes. (I can post the script if anyone's interested.)
This means that there are no import hacks and no (manual) duplication, while still being easy to test using either binding library.