GNOME Bugzilla – Bug 786152
fwupd depends on python pillow
Last modified: 2021-05-17 16:06:34 UTC
Created attachment 357410 [details] [review] 3.26: add python-pil to sysdeps Building fwupd fails with message: --- Meson encountered an error in file meson.build, line 150, column 4: Error encountered: Error: missing dependency python pillow (python3-pil) --- The attached diff file includes "python3-pil" (a.k.a. python-pillow in some distributions) to sysdeps-3-26, using the binary 'pilconvert' as file verification. Some notes on Pillow: - there is no pkg-config file, so can't be tracked with <pkg-config> - there is no xml file, so can't be tracked with dep type "xml" - the includes path (/usr/include) has python version in it (e.g.: /usr/include/python3.6m/Imaging.h), so it would be too much hard to track changes between different Python versions in each distribution using dep type "c_include" using values like e.g. "python3.6m/Imaging.h"
Review of attachment 357410 [details] [review]: ::: modulesets/gnome-sysdeps-3.26.modules @@ +1012,3 @@ + <branch repo="system"/> + <systemdependencies> + <dep type="path" name="pilconvert"/> jhbuild is really bad at handling certain sysdeps. Nice workaround. There's also a python sysdep type, but it can only warn you if a dep is not installed, it can't actually install the sysdep, so this is probably better.
Review of attachment 357410 [details] [review]: commit 972ca256466aaed0edabc7ff24bdc99295a0edeb
Doesn't work on Fedora. Not sure why. :/
It looks like pilconvert and other binaries in Fedora are provided by "python-pillow-doc" package (e.g. Fedora 26 has "python-pillow-doc-4.1.1-1.fc26.noarch.rpm"). Can you please make sure this package is installed?
It's not installed (so sysdeps failed to install it)
python-pillow-doc in Fedora stores the binaries (e.g. pilconvert) in the path "/usr/share/doc/python-pillow-doc/Scripts/". The dep-type "path" uses the prefix "/usr/bin", reason why my workaround isn't good for Fedora. Anyway, fwupd doesn't need binary or include files. It only needs the contents inside site-packages/PIL (e.g. /usr/lib/python3.6/site-packages/PIL)... Ideas on how to look for /usr/lib{,64}/python3.*/site-packages/PIL ?
There is a python2 sysdep type (currently used by rdflib). You could add a python3 type and use that. The installer is not going to work, but it should be able to detect whether it is installed or not so that it blocks the build if missing and doesn't block the build if it has been installed.
I notice the python2 sysdep type uses imp.find_module. Sorry, but my lack of knowledge in Python language doesn't help me figuring how to implement finding a Python3 module with Python2, and I assume imp.find_module doesn't work with different Python versions...
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/jhbuild/-/issues/265.