Am Do., 5. Juli 2018 um 12:59 Uhr schrieb Burton, Ross < [email protected]>:
> On 5 July 2018 at 08:26, Oliver Westermann <[email protected]> wrote: > > I'm fiddeling around with yocto. I want to move some python stuff onto an > > embedded board and use the nxp mx8 yocto. Everything worked as expected > > until now, I was able to create yocto recipes for python modules like > pyv4l2 > > (is there any interest for recipes like these to be commited to > > meta-python?). > > > > Now I wanted to install pillow for some image manipulation, but whereas > > other python module recipes worked fine, this one fails and I don't > > understand why. > > > > Yocto reports missing setuptools: > > > > Log data follows: > > | DEBUG: Executing shell function do_configure > > | NOTE: make clean > > | python setup.py clean > > | Traceback (most recent call last): > > | File "setup.py", line 22, in <module> > > | from setuptools import Extension, setup > > | ImportError: No module named setuptools > > > > I've googled around and everything suggests that inherit setuptools3 is > > missing, but it's present in my recipe. This is my > python3-pillow_5.2.0.bb: > > > > SUMMARY = "Pillow (The friendly PIL fork)" > > HOMEPAGE = "http://python-pillow.org/" > > LICENSE = "EPLv1" > > LIC_FILES_CHKSUM = "file://LICENSE;md5=c6379001ecb47e2a0420c40177fc1125" > > > > SRC_URI[md5sum] = "52d93a34f4180abcff04876f23eaa9b9" > > > > PYPI_PACKAGE = "Pillow" > > > > inherit pypi setuptools3 > > > > BBCLASSEXTEND = "native nativesdk" > > > > Any idea whats missing or what I am doing wrong (other than that the > license > > line is incorrect)? > > Oh, that's a fun one. > > So setuptools/distutils/etc doesn't have the concept of a "configure" > phase but it also doesn't remove the default implementation. The > default implementation will try to do a 'make clean' first to remove > existing build artifacts. Normally this does nothing with Python code > as there's never a Makefile, but pillow has a Makefile. This makefile > does 'python setup.py clean', which is running the *host* Python2 and > you don't have distutils installed. So, it fails. > > Three solutions in order of hackiness (more to less) > 1) Set CLEANBROKEN="1" in the recipe to stop the clean happening > 2) Nullify do_configure in the recipe with do_configure[noexec] = "1" > 3) Override do_configure in distutils3.bbclass to call setup.py > directly to do a clean in do_configure > > I'd say do (1) in your recipe and I'll send a patch for (3) to oe-core. > > And yes, this recipe would be very welcome in meta-python. > > Ross > This does not seem to work as expected. With option 1) and 2) it fails in do_compile: | DEBUG: Executing shell function do_compile | /data/workspace/yocto-build/build/mysys/tmp/work/aarch64-poky-linux/python3-pillow/5.2.0-r0/temp/run.do_compile.14093: 112: /data/workspace/yocto-build/build/mysys/tmp/work/aarch64-poky-linux/python3-pillow/5.2.0-r0/temp/run.do_compile.14093: /data/workspace/yocto-build/build/mysys/tmp/work/aarch64-poky-linux/python3-pillow/5.2.0-r0/recipe-sysroot-native/usr/bin/python3-native/python3: not found | ERROR: python3 setup.py build_ext execution failed. | WARNING: exit code 1 from a shell command. | ERROR: Function failed: do_compile (log file is located at /data/workspace/yocto-build/build/mysys/tmp/work/aarch64-poky-linux/python3-pillow/5.2.0-r0/temp/log.do_compile.14093) Option 3 seems to be out of my league right now, I'm still missing some understanding of what happens when in which context :O But thanks already for the help :) Olli
-- _______________________________________________ yocto mailing list [email protected] https://lists.yoctoproject.org/listinfo/yocto
