簡體   English   中英

在Yocto bitbake中設置autotools的python dist-packages路徑

[英]Set python dist-packages path for autotools in Yocto bitbake

我正在嘗試為使用autotools配置Makefile的項目編寫bitbake文件。

### tizonia.bb
SUMMARY = "Tizonia Library"
DESCRIPTION = "Tizonia"
LICENSE = "LGPL-3.0"
LIC_FILES_CHKSUM = "file://COPYING.LESSER;md5=e6a600fd5e1d9cbde2d983680233ad02"

SRC_URI = "git://github.com/tizonia/tizonia-openmax-il.git;protocol=https"
SRCREV = "9004bc40b89eeafb04b28fbb2b772e47dd62fdc9"

S = "${WORKDIR}/git"

DEPENDS = "python-dev python-setuptools mediainfo log4c python-pip python-soundcloud"

inherit autotools ccache pkgconfig python-dir pythonnative

RDEPENDS_${PN} = "libstdc++ dbus boost libgcc mediainfo log4c libspotify python-pip python-soundcloud"

### python-soundcloud.bb
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSE;md5=31fa3a9dc818e0087893d63583d2d21a"

SRC_URI[md5sum] = "40c1d32afd019ed11ec1fbee3e84e31f"
SRC_URI[sha256sum] = "aad2003592cec945f835f158f7b41ba8bf805c5738a2fcc5629668ea1df653d5"

DEPENDS = "${PYTHON_PN}-modules"

PYPI_PACKAGE = "soundcloud"

inherit pypi setuptools

RDEPENDS_${PN} = "${PYTHON_PN}-modules"

在調用configure腳本的do_configure步驟中,我收到以下錯誤消息:

| checking for python2.7... (cached) /home/developer/build-webos-ose/BUILD/sysroots/x86_64-linux/usr/bin/python-native/python
| checking for a version of Python >= '2.1.0'... yes
| checking for a version of Python >= '2.7'... yes
| checking for the distutils Python package... yes
| checking for Python include path... -I/home/developer/build-webos-ose/BUILD/sysroots/raspberrypi3/usr/include/python2.7
| checking for Python library path... -L/home/developer/build-webos-ose/BUILD/sysroots/raspberrypi3/usr/lib -lpython2.7
| checking for Python site-packages path... /home/developer/build-webos-ose/BUILD/sysroots/x86_64-linux/usr/lib/python2.7/site-packages
| checking python extra libraries... -lpthread -ldl  -lpthread -lutil -lm
| checking python extra linking flags... -Xlinker -export-dynamic
| checking consistency of all components of python development environment... yes
| checking python module: soundcloud... no
| configure: error: failed to find required module soundcloud

如您所見, configure使用sysroots/x86_64-linux/usr/lib/python2.7/site-packages來查找modules ,但模塊安裝在sysroots/raspberrypi3/usr/lib/python2.7/site-packages

如何在autoconf / configure調用中設置site-packages路徑,使其指向正確的路徑?

請記住,配置腳本在HOST上執行,它也會查找在HOST上編譯所需的工具,因此您需要在python-soundcloud-NATIVE包上進行DEPEND(您可能需要使用BBCLASSEXTEND)對於這個包存在),意味着該軟件包安裝的內容將自動填充在recipe-sysroot-native / x86_64-linux / usr / lib / python2.7 / site-packages(因為它依賴於它)這是什么configure腳本也會自動讀取。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM