为什么 yocto scipy 配方需要 python3 明确设置?如何?

Why does yocto scipy recipe require python3 explicitly set? How?

我有一个构建 scipy 的方法,它可以很好地解析并且 bitbake 开始构建但是 python3 不满足版本要求。它以

退出
| DEBUG: Executing shell function do_configure
| Traceback (most recent call last):
|   File "setup.py", line 31, in <module>
|     raise RuntimeError("Python version >= 3.5 required.")
| RuntimeError: Python version >= 3.5 required.
| WARNING: exit code 1 from a shell command.
| ERROR: Function failed: do_configure (log file is located at /home/marius/mender-qemu/build/tmp/work/core2-64-poky-linux/python3-scipy/1.4.1-r0/temp/log.do_configure.30478)

我成功构建了其他 python3 包,可以在 运行 映像中导入。从路径上也可以看出,使用了python3,镜像运行在python3.5上。我正在使用 thud.

为了完成这里是食谱。我还尝试显式添加依赖项 (numpy),但没有任何效果。

SUMMARY = "Scipy summary to be filled"
DESCRIPTION = "Scientific computing"
PYPI_PACKAGE = "scipy"

LICENSE = "BSD"
LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=011ccf01b7e0590d9435a864fc6a4d2b"

SRC_URI[md5sum] = "3a97689656f33f67614000459ec08585"
SRC_URI[sha256sum] = "dee1bbf3a6c8f73b6b218cb28eed8dd13347ea2f87d572ce19b289d6fd3fbc59"

这是python-scipy.inc

inherit setuptools3 distutils
require python-scipy.inc

此外,我尝试添加inherit python3native但没有效果。

我的问题是:如何显式设置 python3 来构建此配方?

我的猜测是你 运行 一个 python 脚本 setup.py 作为构建的一部分需要在你的主机(构建 Yocto 的系统)上 python3 .

你可以这样安装:

sudo apt-get install python3

简单而明显的解决方案是 inherit distutils3 而不是 inherit distutils

注意:可以在此处找到对我来说开箱即用的 python-scipy 食谱:https://github.com/gpanders/oe-scipy

干得好 gpanders!