Search code examples
pythonlinuxdropboxyoctorecipe

Include python-dropbox in Yocto


My Python application uses Dropbox and I need to include this library in my Yocto image. I managed to generate a recipe for it with pipoe (pipoe -p dropbox). Here it is:

SUMMARY = "Official Dropbox API Client"
HOMEPAGE = "http://www.dropbox.com/developers"
AUTHOR = "Dropbox <[email protected]>"
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

When I run it, it says:

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

and then

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

so I added the following line to the generated recipe:

DEPENDS = "python3-pytest-runner-native "

But I still get the same error. Any idea?


Solution

  • Probably an issue with inconsistent Python version.

    You inherit setuptools which is for python2. The RDEPENDS are for python2 dependencies. But you add python3-pytest-runner-native in DEPENDS.

    I'd suggest finding out which python version to use for this software and use the same for all RDEPENDS, inherited classes (setuptools3 for python3), and DEPENDS.