Reputation: 4089
I am trying to package https://github.com/kliment/Printrun in a Yocto recipe but cannot get it working. My recipe currently looks as follows:
LICENSE = "AGPLv3"
LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
PV = "2.7"
SRCREV = "0193a9dbe31458c45059bf2dcb0a9905b7bb06fc"
SRC_URI = "git://github.com/kliment/Printrun.git;protocol=git;branch=master"
RDEPENDS_${PN} = "python-cython \
python-pyserial \
"
S = "${WORKDIR}/git"
inherit distutils
I am assuming this is what I need to do because it has a setup.py that inherits from distutils? If so, this does not work and I get an error complaining about a lack of the serial module:
DEBUG: Executing shell function do_compile
WARNING: Failed to cythonize: No module named Cython.Build
Traceback (most recent call last):
File "setup.py", line 36, in <module>
from printrun.printcore import __version__ as printcore_version
File "/home/gerhard/Jethro/yocto/build/out-glibc/work/armv7at2hf-vfp-neon-angstrom-linux-gnueabi/printrun/2.7-r0/git/printrun/printcore.py", line 20, in <module>
from serial import Serial, SerialException, PARITY_ODD, PARITY_NONE
ImportError: No module named serial
ERROR: python setup.py build execution failed.
ERROR: Function failed: do_compile (log file is located at /home/gerhard/Jethro/yocto/build/out-glibc/work/armv7at2hf-vfp-neon-angstrom-linux-gnueabi/printrun/2.7-r0/temp/log.do_compile.15542)
I would also like to be able to compile the small cythonable module with cython. For some reason both cython and psyerial are not availible even though I added them as rdepends, what am I doing wrong?
Upvotes: 2
Views: 2276
Reputation: 28880
You added dependency on python cython only on runtime. I guess you need to add also for compilation.
DEPENDS_${PN} = "python-cython \
python-pyserial"
Upvotes: 2