After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 786152 - fwupd depends on python pillow
fwupd depends on python pillow
Status: RESOLVED OBSOLETE
Product: jhbuild
Classification: Infrastructure
Component: module sets
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Jhbuild maintainers
Jhbuild QA
Depends on:
Blocks:
 
 
Reported: 2017-08-11 12:57 UTC by Rafael Fontenelle
Modified: 2021-05-17 16:06 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
3.26: add python-pil to sysdeps (1.09 KB, patch)
2017-08-11 12:57 UTC, Rafael Fontenelle
committed Details | Review

Description Rafael Fontenelle 2017-08-11 12:57:24 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"
Comment 1 Michael Catanzaro 2017-08-11 14:53:38 UTC
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.
Comment 2 Rafael Fontenelle 2017-08-11 15:13:46 UTC
Review of attachment 357410 [details] [review]:

commit 972ca256466aaed0edabc7ff24bdc99295a0edeb
Comment 3 Michael Catanzaro 2017-08-11 16:25:18 UTC
Doesn't work on Fedora. Not sure why. :/
Comment 4 Rafael Fontenelle 2017-08-11 17:19:15 UTC
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?
Comment 5 Michael Catanzaro 2017-08-11 17:57:25 UTC
It's not installed (so sysdeps failed to install it)
Comment 6 Rafael Fontenelle 2017-08-12 13:14:02 UTC
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 ?
Comment 7 Michael Catanzaro 2017-08-12 15:42:20 UTC
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.
Comment 8 Rafael Fontenelle 2017-08-28 13:48:53 UTC
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...
Comment 9 GNOME Infrastructure Team 2021-05-17 16:06:34 UTC
-- 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.