pybind / pybind/python_example
yocto recipe for this example
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- Python
- Estrellas
- 530
- Forks
- 150
- Merge medio
- 8 d 2 h
- PR fusionados (30 d)
- 1
Descripción
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?
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Línea de trabajo
Comienza con setup.py y pyproject.toml; después, inspecciona la receta de Yocto enviada y el registro de do_compile que muestra el módulo pybind11 ausente. Comprueba cómo se ponen a disposición los requisitos de compilación de este ejemplo durante la compilación de Yocto. Se considera terminado cuando la receta se compila correctamente y produce una imagen de ejemplo ejecutable.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- python
- Área
- build-system
- Tipo de issue
- Error
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 35/100