我希望将更多的python模块添加到我的yocto/openembedded项目中,但我不确定该如何做?我希望添加flask及其依赖项。
发布于 2018-04-17 16:17:16
一些python包在元文件夹中有相应的食谱,例如Enum类:
meta-openembedded/meta-python/recipes-devtools/python/python-enum34_1.1.6.bb
不幸的是,许多有用的类不可用,但python应用程序可能需要一些。习惯于在已启动的平台上使用pip安装缺少的软件包吗?但是,如果目标产品没有连接到IP网络怎么办?解决方案是实现一个新的配方,并添加到平台元层(至少)。示例是用于截取按键/按钮触摸事件的模块keyboard的配方:
https://pypi.org/project/keyboard/
软件包描述页面上提供的
https://github.com/boppreh/keyboard/archive/master.zip
- SUMMARY - could be obtained from the package description page
- HOMEPAGE - the project URL on github or bitbucket or sourceforge, etc
- LICENSE - verify license type
- LIC\_FILES\_CHKSUM by executing `md5sum` on existing `LICENSE` or `README` or `PKG-INFO` file located in the root of the package (preferrably)
- SRC\_URI[md5sum] - is `md5sum` of the archive itself. it will be used to discover and download archive on pypi server automatically with the help of supporting script `inherit pypi`
- PYPI\_PACKAGE\_EXT - if the package is not `tar.gz` require to supply the correct extension
python-keyboard_0.13.1.bb配方:`
SUMMARY = "Hook and simulate keyboard events on Windows and Linux"
HOMEPAGE = "https://github.com/boppreh/keyboard"
LICENSE = "BSD-3-Clause"
LIC_FILES_CHKSUM = "file://PKG-INFO;md5=9bc8ba91101e2f378a65d36f675c88b7"
SRC_URI[md5sum] = "d4b90e53bbde888e7b7a5a95fe580a30"
SRC_URI += "file://add_missing_CHANGES_md.patch"
PYPI_PACKAGE = "keyboard"
PYPI_PACKAGE_EXT = "zip"
inherit pypi
inherit setuptools
BBCLASSEXTEND = "native nativesdk"`
修补程序包
SRC_URI += "file://add_missing_CHANGES_md.patch"
指令发送到配方,因为setup.py脚本使用CHANGES.md文件来标识包版本(此步骤是可选的)。补丁本身必须放在与配方名称匹配的配方旁边的文件夹中,但没有版本:
python-keyboard
发布于 2020-04-14 19:17:44
这个问题由来已久,但目前在2020年有一个名为pipoe的python包。
pipoe可以为您生成与python包对应的.bb类!
用法:
$ pip3 install pipoe
$ pipoe -p requests
OR
$ pipoe -p requests --python python3现在将生成的.bb文件复制到您的层并使用它们。
发布于 2016-08-10 14:15:56
layers.openembedded.org上的OE层索引列出了所有已知层和它们包含的配方,因此搜索应该会打开meta-python层,您可以将其添加到构建中并使用其中的配方。
https://stackoverflow.com/questions/38862088
复制相似问题