A new builtin option is available: -Dpython.bytecompile=2. It can be used to compile bytecode for all pure python files installed via the python module.
-Dpython.bytecompile=2