On 3 May 2017 at 21:50, Chris Trobridge <christrobri...@hotmail.com> wrote: > 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
Looks fine to me. I believe distutils/setuptools would do this for you though. Jussi
-- _______________________________________________ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto