Though there's no perfect solution, the following can be done:
- Move some critical piece of startup code into a native library.
- Enforce the license check in the native library.
If the call to the native code were to be removed, the program wouldn't start anyway. If it's not removed then the license will be enforced.
Though this is not a cross-platform or a pure-Python solution, it will work.