I am using Yocto to build an OS image for an embedded Linux target. Yocto is running on Ubuntu 20.04 and is using dunfell for all meta layers.
The resulting image has Python 3.8 installed, and includes the python3-requests package.
Now, I am trying to write a bitbake recipe to install the 'podman-py' ( https://github.com/containers/podman-py ) package ( which is not on PyPi ).
Here is my current version of the bitbake recipe:
SUMMARY = "This python package is a set of bindings to use the new RESTful API in libpod."
HOMEPAGE = "https://github.com/containers/podman-py"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e"
inherit setuptools3
DEPENDS += "python3-requests"
SRCREV = "312b7434843e2ff653e46f9c837e6eeb491c8bff"
PV = "1.0.0+git${SRCPV}"
S = "${WORKDIR}/git"
SRC_URI="git://git@github.com/containers/podman-py.git;branch=master;protocol=ssh"
DEPENDS += "python3-pip-native"
Even though I have python3-requests installed successfully in the resulting image, Yocto throws the following error:
| ModuleNotFoundError: No module named 'requests'
| ERROR: 'python3 setup.py build ' execution failed.
| WARNING: /home/me/Desktop/poky/build-microchip/tmp/work/cortexa5t2hf-neon-vfpv4-poky-linux-musleabi/python3-podman-py/1.0.0+gitAUTOINC+312b743484-r0/temp/run.do_compile.50185:1 exit 1 from 'exit 1'
| ERROR: Execution of '/home/me/Desktop/poky/build-microchip/tmp/work/cortexa5t2hf-neon-vfpv4-poky-linux-musleabi/python3-podman-py/1.0.0+gitAUTOINC+312b743484-r0/temp/run.do_compile.50185' failed with exit code 1:
| Traceback (most recent call last):
| File "/home/me/Desktop/poky/build-microchip/tmp/work/cortexa5t2hf-neon-vfpv4-poky-linux-musleabi/python3-podman-py/1.0.0+gitAUTOINC+312b743484-r0/git/setup.py", line 3, in <module>
| import podman
| File "/home/me/Desktop/poky/build-microchip/tmp/work/cortexa5t2hf-neon-vfpv4-poky-linux-musleabi/python3-podman-py/1.0.0+gitAUTOINC+312b743484-r0/git/podman/__init__.py", line 4, in <module>
| from podman.api_connection import ApiConnection
| File "/home/me/Desktop/poky/build-microchip/tmp/work/cortexa5t2hf-neon-vfpv4-poky-linux-musleabi/python3-podman-py/1.0.0+gitAUTOINC+312b743484-r0/git/podman/api_connection.py", line 10, in <module>
| import podman.containers as containers
| File "/home/me/Desktop/poky/build-microchip/tmp/work/cortexa5t2hf-neon-vfpv4-poky-linux-musleabi/python3-podman-py/1.0.0+gitAUTOINC+312b743484-r0/git/podman/containers/__init__.py", line 7, in <module>
| import podman.errors as errors
| File "/home/me/Desktop/poky/build-microchip/tmp/work/cortexa5t2hf-neon-vfpv4-poky-linux-musleabi/python3-podman-py/1.0.0+gitAUTOINC+312b743484-r0/git/podman/errors/__init__.py", line 8, in <module>
| from .exceptions import APIError, ImageNotFound, NotFound
| File "/home/me/Desktop/poky/build-microchip/tmp/work/cortexa5t2hf-neon-vfpv4-poky-linux-musleabi/python3-podman-py/1.0.0+gitAUTOINC+312b743484-r0/git/podman/errors/exceptions.py", line 5, in <module>
| from requests import Response
| ModuleNotFoundError: No module named 'requests'
| WARNING: /home/me/Desktop/poky/build-microchip/tmp/work/cortexa5t2hf-neon-vfpv4-poky-linux-musleabi/python3-podman-py/1.0.0+gitAUTOINC+312b743484-r0/temp/run.do_compile.50185:1 exit 1 from 'exit 1'
How can I get this package to build with Yocto? Thanks.