Search code examples
pythonyoctobitbake

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


I have a recipe to build scipy which parses fine and bitbake starts building but the python3 version requirement is not met. It exits with

| 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)

I successfully built other python3 packages which can be imported in the running image. You can also see from the path that python3 is used and the image runs on python3.5. I'm using thud.

For the sake of completion here is the recipe. I also tried explicitly adding dependencies (numpy) but that did not have any effect.

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"

This is the python-scipy.inc

inherit setuptools3 distutils
require python-scipy.inc

Also, I tried to add inherit python3native without effect.

My question is: how can I explicitly set python3 to build this recipe?


Solution

  • The simple and obvious solution was to inherit distutils3 instead of inherit distutils.

    NOTE: A python-scipy recipe that worked out of the box for me can be found here: https://github.com/gpanders/oe-scipy

    Nice job gpanders!