To improve startup speed I have decided to pre-compile python3 byte code in my 
bb recipe.  This is done semi automatically with the rpm build for Fedora but 
I've not found anything similar for Yocto.


I initially tried to use compileall:


python3 -m compileall ${D}/opt/test_app/python


This almost worked but it uses the host python3 to failed with a slight 
difference in magic.


The following works, as it uses the native python3 compiled by bitbake but it 
feels a little contrived.  Is there a better way of specifying the native 
python3 interpreter, or a better way of getting my python byte code compiled 
prior to generating the packages?


${STAGING_BINDIR_NATIVE}/python3-native/python3 -m compileall 
${D}/opt/test_app/python

Cheers,

Chris

-- 
_______________________________________________
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto

Reply via email to