pybind / pybind/python_example

yocto recipe for this example

オープン
#189 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

主要言語
Python
スター
530
フォーク
150
平均マージ
8日 2時間
マージ済み PR(30日)
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. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

setup.py と pyproject.toml から始め、提出された Yocto レシピと、pybind11 モジュールが見つからないことを示している do_compile ログを確認します。この例のビルド要件が Yocto ビルド中にどのように利用可能になるかを確認します。レシピが正常にビルドされ、実行可能なサンプルイメージが生成されれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
python
領域
build-system
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。