On 09/12/2019 16:30, Patrick Doyle wrote:
But then I started wondering if I could change do_compile to python,
have it import assemble-tsk-blob, and get the best of both worlds --
the ability to test assemble-tsk-blob outside of bitbake, and the
efficiency of including its core operation directly within
do_compile() and not requring that I spin up another python instance.
Every layer can have a lib/ folder which is on the Python search path
(you'll see lots of recipes use oe.*, which is meta/lib/oe/) so you can
just put Python modules in there.
Alternatively if the python is recipe-specific you could put the script
next to the recipe and fiddle sys.path before importing?
python do_compile() {
sys.path.append(os.path.dirname(d.getVar("FILE")))
import foobar
}
Ross
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#47616): https://lists.yoctoproject.org/g/yocto/message/47616
Mute This Topic: https://lists.yoctoproject.org/mt/67822266/21656
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-