Here is an idea which is at least testable: define 'derivative work' to mean the part which cannot be ported to another platform.
So you go to, oh, cherry.py, and make your theme work.
Inevitably, there would need to be some python shimming to de-conflict your namespaces, make up for missing functionality, and the like.
The part of your work that runs the same everywhere is called the 'theme'.