pybind / pybind/python_example

yocto recipe for this example

未关闭
#189 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

主要语言
Python
星标
530
派生
150
平均合并
8 天 2 小时
30 天内合并 PR
1

描述

I have a very basic idea about Yocto. I have added python3-pybind11 package into IMAGE_INSTALL and I checked if it is in the target:

root@qemuarm64:~# python3
Python 3.8.18 (default, Aug 24 2023, 19:48:18) 
[GCC 9.5.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import pybind11
>>> pybind11.__version__
'2.4.3'

The version is a bit old. Anyway I have changed pyproject.toml by lowering the version in the example:

[build-system]
requires = [
    "setuptools>=42",
    "pybind11>=2.4.0", # << changed this
]
...

With this change, I still can build and run the example locally.

I created this recipe by devtool add:

SUMMARY = "A test project using pybind11"
HOMEPAGE = "https://github.com/pybind/python_example"
LICENSE = "Unknown"
LIC_FILES_CHKSUM = "file://LICENSE;md5=153b3e05cd731791777324af9f7219b3"

SRC_URI = "git://git@gitlab.com/sharedlib/python-example-pybind.git;protocol=ssh;branch=master"

PV = "1.0+git${SRCPV}"
SRCREV = "e2350ed9dad1c5b424f840c21079d51976463e41"

S = "${WORKDIR}/git"

inherit setuptools3

RDEPENDS_${PN} += "python3-pybind11"

FILES_${PN} += "/usr/lib/"

And I got this error:

ERROR: python-example-1.0+git999-r0 do_compile: 'python3 setup.py build ' execution failed.
ERROR: python-example-1.0+git999-r0 do_compile: Execution of '/workspaces/devcontainer-do/build/tmp/work/aarch64-poky-linux/python-example/1.0+git999-r0/temp/run.do_compile.701172' failed with exit code 1
ERROR: Logfile of failure stored in: /workspaces/devcontainer-do/build/tmp/work/aarch64-poky-linux/python-example/1.0+git999-r0/temp/log.do_compile.701172
Log data follows:
| DEBUG: Executing python function externalsrc_compile_prefunc
| NOTE: python-example: compiling from external source tree /workspaces/devcontainer-do/build/workspace/sources/python-example
| DEBUG: Python function externalsrc_compile_prefunc finished
| DEBUG: Executing shell function do_compile
| Traceback (most recent call last):
|   File "setup.py", line 2, in <module>
|     from pybind11.setup_helpers import Pybind11Extension, build_ext
| ModuleNotFoundError: No module named 'pybind11'
| ERROR: 'python3 setup.py build ' execution failed.
| WARNING: exit code 1 from a shell command.

Can you help me?

贡献指南

这个仓库没有索引到贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

从 setup.py 和 pyproject.toml 开始,然后检查已提交的 Yocto 配方,以及显示缺少 pybind11 模块的 do_compile 日志。检查此示例的构建要求如何在 Yocto 构建期间可用。完成的标准是配方能够成功构建并生成一个可运行的示例镜像。

由索引模型根据 Issue 内容生成。

评估

技术栈
python
领域
build-system
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。