问题描述
我在 yocto 中需要 boto3,但找不到安装 botocore 的配方.
I need boto3 in yocto and I cannot find a recipe that install botocore.
我找到了 boto3 的配方,见下文,但是 boto3-xxx.tar.gz 通过 requirements.txt 安装 botocore.Yocto 似乎没有运行它.
I have found the recipe for boto3, see below, but the boto3-xxx.tar.gz installs botocore through requirements.txt. Yocto does not seems to run it.
最后,安装了 boto3,但完全缺少 botocore.
Finally, boto3 is installed but it is completely missing botocore.
HOMEPAGE = "https://github.com/boto/boto"
SUMMARY = "Amazon Web Services API"
DESCRIPTION = "\
Boto3 is the Amazon Web Services (AWS) Software Development Kit (SDK) for Python, \
which allows Python developers to write software that makes use of services like \
Amazon S3 and Amazon EC2. \
"
SECTION = "devel/python"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSE;md5=2ee41112a44fe7014dce33e26468ba93"
SRCNAME = "boto3"
SRC_URI = "https://pypi.python.org/packages/source/b/${SRCNAME}/${SRCNAME}-${PV}.tar.gz"
SRC_URI[md5sum] = "fb8b77d4ac10a971570419dd3613196e"
SRC_URI[sha256sum] = "4856c8cb4150b900cc7dccbdf16f542fb8c12e97b17639979e58760847f7cf35"
inherit pypi setuptools3
问候马可
推荐答案
使用 Yocto python 配方的一个好习惯是使用 pipoe
A good practice when coming to Yocto python recipes is to use pipoe
为 boto3 运行 pipoe 会创建 boto3 配方及其依赖项配方:
Running pipoe for boto3 creates boto3 recipe with its dependencies recipes:
pipoe -p boto3 --python python3
pipoe -p boto3 --python python3
输出:
- python3-boto3_1.17.98.bb
- python3-botocore_1.20.98.bb
- python3-jmespath_0.10.0.bb
- python3-s3transfer_0.4.2.bb
python3-boto3_1.17.98.bb:
SUMMARY = "The AWS SDK for Python"
HOMEPAGE = "https://github.com/boto/boto3"
AUTHOR = "Amazon Web Services <>"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=2ee41112a44fe7014dce33e26468ba93"
SRC_URI = "https://files.pythonhosted.org/packages/cd/16/90930985c3f2db2a8d412f6f05b68c80ee7417d8a630c27f94bb032131c1/boto3-1.17.98.tar.gz"
SRC_URI[md5sum] = "89b046023f1d05e4c2573fad5ea6c020"
SRC_URI[sha256sum] = "fccfa81cda69bb2317ed97e7149d7d84d19e6ec3bfbe3f721139e7ac0c407c73"
S = "${WORKDIR}/boto3-1.17.98"
RDEPENDS_${PN} = "python3-botocore python3-jmespath python3-s3transfer"
inherit setuptools3
python3-botocore_1.20.98.bb:
SUMMARY = "Low-level, data-driven core of boto 3."
HOMEPAGE = "https://github.com/boto/botocore"
AUTHOR = "Amazon Web Services <>"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=2ee41112a44fe7014dce33e26468ba93"
SRC_URI = "https://files.pythonhosted.org/packages/28/f4/3dc9e36d0b73341f14a5112561f7540fd76f0a692c7dcc83a3be5d7436de/botocore-1.20.98.tar.gz"
SRC_URI[md5sum] = "05798450904b0d3d8fa5db24e2208e85"
SRC_URI[sha256sum] = "b2a49de4ee04b690142c8e7240f0f5758e3f7673dd39cf398efe893bf5e11c3f"
S = "${WORKDIR}/botocore-1.20.98"
RDEPENDS_${PN} = ""
inherit setuptools3
python3-jmespath_0.10.0.bb:
SUMMARY = "JSON Matching Expressions"
HOMEPAGE = "https://github.com/jmespath/jmespath.py"
AUTHOR = "James Saryerwinnie <[email protected]>"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=2683790f5fabb41a3f75b70558799eb4"
SRC_URI = "https://files.pythonhosted.org/packages/3c/56/3f325b1eef9791759784aa5046a8f6a1aff8f7c898a2e34506771d3b99d8/jmespath-0.10.0.tar.gz"
SRC_URI[md5sum] = "65bdcb5fa5bcf1cc710ffa508e78e408"
SRC_URI[sha256sum] = "b85d0567b8666149a93172712e68920734333c0ce7e89b78b3e987f71e5ed4f9"
S = "${WORKDIR}/jmespath-0.10.0"
RDEPENDS_${PN} = ""
inherit setuptools3
python3-s3transfer_0.4.2.bb:
SUMMARY = "An Amazon S3 Transfer Manager"
HOMEPAGE = "https://github.com/boto/s3transfer"
AUTHOR = "Amazon Web Services <[email protected]>"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=b1e01b26bacfc2232046c90a330332b3"
SRC_URI = "https://files.pythonhosted.org/packages/27/90/f467e516a845cf378d85f0a51913c642e31e2570eb64b352c4dc4c6cbfc7/s3transfer-0.4.2.tar.gz"
SRC_URI[md5sum] = "a6771f1bbff440e3c7f550357c3e5ee1"
SRC_URI[sha256sum] = "cb022f4b16551edebbb31a377d3f09600dbada7363d8c5db7976e7f47732e1b2"
S = "${WORKDIR}/s3transfer-0.4.2"
RDEPENDS_${PN} = ""
inherit setuptools3
boto3 在 botocore 上有 RDEPENDS,因此将 python3-boto3 添加到 IMAGE_INSTALL 将确保 botocore 随附.
boto3 has RDEPENDS on botocore, so adding python3-boto3 to IMAGE_INSTALL will insure that botocore is shipped with it.
这篇关于如何在 yocto 中安装 botocore的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!