If you're sure you only use standard python libs it's fairly easy.
make a recipe (name it how ever you like)
SCR_URI = "file://<your script>.py"
do_install() {
install -m 0755 <your script>.py ${bindir}/<your script>.py
}
RDEPENDS:${PN} += "python3-core"
in the image
IMAGE_INSTALL += "<your recipe name>"
---
if your script needs further libraries, reference them in the recipe with
RDEPENDS:${PN} += "python3-core dependency1 dependency2 dependency3..."
Then you call the result on your device with <your script>.py from any
console
Maybe add a "#!/usr/bin/env python3" shebang as a first line to your script
On 26.08.21 17:14, [email protected] wrote:
Hello,
Can anyone suggest how to make a python script executable on the yocto
image? I 've been trying with the pyinstaller but didn't work, I made it
executable on my laptop and transfer it to yocto image but didn't work
also,
Has any one tried it before? are there other alternatives?
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#54572): https://lists.yoctoproject.org/g/yocto/message/54572
Mute This Topic: https://lists.yoctoproject.org/mt/85163328/21656
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-