【问题标题】:Include python-dropbox in Yocto在 Yocto 中包含 python-dropbox
【发布时间】:2020-11-13 18:28:03
【问题描述】:

我的 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 版本不一致的问题。您继承了用于 python2 的 setuptools。 RDEPENDS 用于 python2 依赖项。但是你在 DEPENDS 中添加了 python3-pytest-runner-native。我建议找出用于该软件的 python 版本,并对所有 RDEPENDS、继承的类(python3 的 setuptools3)和 DEPENDS 使用相同的版本。如果问题仍然存在,可能还有其他事情要做:)
  • 是的,就是这样!一旦我在我的 DEPENDS bitbake 中将 python3 更改为 python 成功结束,谢谢。如果您将其写为答案,我会接受。

标签: python linux dropbox yocto recipe


【解决方案1】:

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

inherit setuptools 用于 python2。 RDEPENDS 用于 python2 依赖项。但是你在DEPENDS 中添加python3-pytest-runner-native

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

【讨论】:

    猜你喜欢
    • 2020-05-12
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-12-11
    • 2015-12-25
    • 2020-05-19
    • 2018-07-17
    相关资源
    最近更新 更多