Yocto setup.py需要pyserial

时间:2016-04-16 14:35:38

标签: python embedded-linux yocto bitbake

我正在尝试将https://github.com/kliment/Printrun打包在Yocto配方中,但无法使其正常工作。我的食谱目前看起来如下:

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

我假设这是我需要做的,因为它有一个继承自distutils的setup.py?如果是这样,这不起作用,我得到一个错误抱怨缺少串行模块:

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)

我还希望能够用cython编译小的cythonable模块。出于某种原因,即使我将它们添加为rdepends,cython和psyerial都不可用,我做错了什么?

1 个答案:

答案 0 :(得分:1)

你只在运行时添加了对python cython的依赖。我想你还需要添加进行编译。

gcc -m32 -o poc -Ttext=0x8000000