在 Yocto 中包含 python-dropbox

Include python-dropbox in Yocto

我的 Python 应用程序使用 Dropbox,我需要在我的 Yocto 图像中包含这个库。我设法用 pipoe (pipoe -p dropbox) 为它生成了一个食谱。这是:

SUMMARY = "Official Dropbox API Client"
HOMEPAGE = "http://www.dropbox.com/developers"
AUTHOR = "Dropbox <dev-platform@dropbox.com>"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSE;md5=ef3219362ea5e452a18031af12f35eb6"

SRC_URI = "https://files.pythonhosted.org/packages/85/33/bffd4a7596f3280f8bd2796b4f09c5c701b99d5c8e68715351cc2b3eeca8/dropbox-10.3.0.tar.gz"
SRC_URI[md5sum] = "f6d1a30af7e202237d660213d22e48a7"
SRC_URI[sha256sum] = "5f296f13ee7c358ab41779a73c4922ed81199447566c1a4c8fbf23dbcda25e20"

S = "${WORKDIR}/dropbox-10.3.0"

RDEPENDS_${PN} = "python-requests python-six "

inherit setuptools

当我 运行 它时,它说:

| ERROR: Do not try to fetch `pytest-runner' for building. Please add its native recipe to DEPENDS.

然后

| raise DistributionNotFound(req, requirers)
| pkg_resources.DistributionNotFound: The 'pytest-runner' distribution was not found and is required by the application

所以我在生成的食谱中添加了以下行:

DEPENDS = "python3-pytest-runner-native "

但我仍然遇到同样的错误。有什么想法吗?

可能是 Python 版本不一致的问题。

inherit setuptools 是为了 python2。 RDEPENDS 用于 python2 依赖项。但是你在 DEPENDS.

中添加 python3-pytest-runner-native

我建议找出该软件使用哪个 python 版本,并将相同版本用于所有 RDEPENDS,继承 类(setuptools3 用于 python3), 和 DEPENDS.