Or you can just make sure __pycache__ gets populated ;-) python3 -m compileall ${buildroot}/usr/lib64/libreoffice/program/ python3 -m compileall ${buildroot}/usr/lib64/libreoffice/share/extensions/ should in theory work ;-)