2016-04-16 118 views
1

我想在Yocto配方中打包https://github.com/kliment/Printrun,但無法正常工作。我的食譜目前看起來如下:Yocto setup.py需要pyserial

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 

我假設這是我需要做的,因爲它有一個setup.py從distutils繼承?如果是這樣,這並不工作,我得到一個錯誤抱怨缺乏串口模塊:

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) 

我也想能夠編譯小cythonable模塊用Cython。由於某些原因,即使我將它們添加爲rdepends,cython和psyerial都不可用,但我做錯了什麼?

+0

該錯誤指出有一個日誌文件,你看過它嗎? – stdcall

+0

@stdcall是的,該錯誤塊是日誌文件 – Gerharddc

+0

谷歌是否爲'無法cythonize:沒有名爲Cython.Build'模塊 – stdcall

回答

0

您只在運行時添加了對python cython的依賴。我想你還需要添加編譯。

DEPENDS_${PN} = "python-cython \ 
        python-pyserial" 
+0

好的,修復了cython問題,但不是pyserial的,奇怪的... – Gerharddc

+0

不奇怪。它明確指出該軟件包已丟失,並且找不到它。你確定它存在嗎? – stdcall

+0

是的,如果我只是安裝python-pyserial,然後在設備上運行程序,那麼它運行良好。我在想,讓安裝腳本依賴於它是瘋狂的,但只會補丁。 – Gerharddc