* [Buildroot] [PATCH 1/2] package/python-pyqt5: add qt optional dependencies
@ 2019-08-18 22:46 Fabrice Fontaine
2019-08-18 22:46 ` [Buildroot] [PATCH 2/2] package/python-pyqt5: disable QtQuick module without opengl Fabrice Fontaine
2019-08-19 12:39 ` [Buildroot] [PATCH 1/2] package/python-pyqt5: add qt optional dependencies Thomas Petazzoni
0 siblings, 2 replies; 5+ messages in thread
From: Fabrice Fontaine @ 2019-08-18 22:46 UTC (permalink / raw)
To: buildroot
python-pyqt5 optionally depends on qt5enginio, qt5location,
qt5multimedia, qt5quickcontrols, qt5quickcontrols2, qt5sensors,
qt5serialport, qt5svg, qt5webchannel, qt5webengine, qt5webkit,
qt5websockets and qt5x11extras
Fixes:
- https://bugs.buildroot.org/show_bug.cgi?id=12121
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
package/python-pyqt5/python-pyqt5.mk | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/package/python-pyqt5/python-pyqt5.mk b/package/python-pyqt5/python-pyqt5.mk
index 4955936ae3..c2398301f7 100644
--- a/package/python-pyqt5/python-pyqt5.mk
+++ b/package/python-pyqt5/python-pyqt5.mk
@@ -10,7 +10,23 @@ PYTHON_PYQT5_SITE = http://downloads.sourceforge.net/project/pyqt/PyQt5/PyQt-$(P
PYTHON_PYQT5_LICENSE = GPL-3.0
PYTHON_PYQT5_LICENSE_FILES = LICENSE
-PYTHON_PYQT5_DEPENDENCIES = python-sip host-python-sip qt5base
+PYTHON_PYQT5_DEPENDENCIES = \
+ python-sip \
+ host-python-sip \
+ qt5base \
+ $(if $(BR2_PACKAGE_QT5ENGINIO),qt5enginio) \
+ $(if $(BR2_PACKAGE_QT5LOCATION),qt5location) \
+ $(if $(BR2_PACKAGE_QT5MULTIMEDIA),qt5multimedia) \
+ $(if $(BR2_PACKAGE_QT5QUICKCONTROLS),qt5quickcontrols) \
+ $(if $(BR2_PACKAGE_QT5QUICKCONTROLS2),qt5quickcontrols2) \
+ $(if $(BR2_PACKAGE_QT5SENSORS),qt5sensors) \
+ $(if $(BR2_PACKAGE_QT5SERIALPORT),qt5serialport) \
+ $(if $(BR2_PACKAGE_QT5SVG),qt5svg) \
+ $(if $(BR2_PACKAGE_QT5WEBCHANNEL),qt5webchannel) \
+ $(if $(BR2_PACKAGE_QT5WEBENGINE),qt5webengine) \
+ $(if $(BR2_PACKAGE_QT5WEBKIT),qt5webkit) \
+ $(if $(BR2_PACKAGE_QT5WEBSOCKETS),qt5websockets) \
+ $(if $(BR2_PACKAGE_QT5X11EXTRAS),qt5x11extras)
ifeq ($(BR2_PACKAGE_PYTHON),y)
PYTHON_PYQT5_PYTHON_DIR = python$(PYTHON_VERSION_MAJOR)
--
2.20.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH 2/2] package/python-pyqt5: disable QtQuick module without opengl
2019-08-18 22:46 [Buildroot] [PATCH 1/2] package/python-pyqt5: add qt optional dependencies Fabrice Fontaine
@ 2019-08-18 22:46 ` Fabrice Fontaine
2019-08-19 12:39 ` [Buildroot] [PATCH 1/2] package/python-pyqt5: add qt optional dependencies Thomas Petazzoni
1 sibling, 0 replies; 5+ messages in thread
From: Fabrice Fontaine @ 2019-08-18 22:46 UTC (permalink / raw)
To: buildroot
QtQuick module can't be built without opengl support:
Generating the C++ source for the QtQuick module...
/home/buildroot/autobuild/run/instance-0/output/host/bin/sip -w -f -t WS_X11 -t Qt_5_12_4 -x PyQt_OpenGL -x PyQt_Desktop_OpenGL -B Qt_6_0_0 -P -y QtQuick.pyi -c /home/buildroot/autobuild/run/instance-0/output/build/python-pyqt5-5.7/QtQuick -I sip -I /home/buildroot/autobuild/run/instance-0/output/build/python-pyqt5-5.7/sip /home/buildroot/autobuild/run/instance-0/output/build/python-pyqt5-5.7/sip/QtQuick/QtQuickmod.sip
sip: QOpenGLFramebufferObject is undefined
Fixes:
- http://autobuild.buildroot.org/results/cb69c5daa564aa9f3250faa395399cb00a445e85
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
package/python-pyqt5/python-pyqt5.mk | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/package/python-pyqt5/python-pyqt5.mk b/package/python-pyqt5/python-pyqt5.mk
index c2398301f7..5226b1fda5 100644
--- a/package/python-pyqt5/python-pyqt5.mk
+++ b/package/python-pyqt5/python-pyqt5.mk
@@ -70,6 +70,11 @@ PYTHON_PYQT5_CONF_OPTS = \
--no-docstrings \
--no-sip-files
+# QtQuick module can't be built without opengl
+ifneq ($(BR2_PACKAGE_QT5BASE_OPENGL),y)
+PYTHON_PYQT5_CONF_OPTS += --disable=QtQuick
+endif
+
define PYTHON_PYQT5_CONFIGURE_CMDS
$(call PYTHON_PYQT5_GENERATE_QTDETAIL,$(@D))
(cd $(@D); \
--
2.20.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH 1/2] package/python-pyqt5: add qt optional dependencies
2019-08-18 22:46 [Buildroot] [PATCH 1/2] package/python-pyqt5: add qt optional dependencies Fabrice Fontaine
2019-08-18 22:46 ` [Buildroot] [PATCH 2/2] package/python-pyqt5: disable QtQuick module without opengl Fabrice Fontaine
@ 2019-08-19 12:39 ` Thomas Petazzoni
2019-08-19 12:57 ` Fabrice Fontaine
1 sibling, 1 reply; 5+ messages in thread
From: Thomas Petazzoni @ 2019-08-19 12:39 UTC (permalink / raw)
To: buildroot
Hello,
On Mon, 19 Aug 2019 00:46:46 +0200
Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote:
> python-pyqt5 optionally depends on qt5enginio, qt5location,
> qt5multimedia, qt5quickcontrols, qt5quickcontrols2, qt5sensors,
> qt5serialport, qt5svg, qt5webchannel, qt5webengine, qt5webkit,
> qt5websockets and qt5x11extras
>
> Fixes:
> - https://bugs.buildroot.org/show_bug.cgi?id=12121
>
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Thanks for looking so quickly into this bug report. I also had a look
yesterday, and I think we should use the --enable option of PyQT5
configure.py script, to force the list of modules we want to enable.
This way, if one we enable does not work for some reason, the build
will fail instead of silently ignoring it. It also prevents PyQt5 from
automatically detecting which modules it should build.
Also, on another note, I see we prefeed a qtdetail.out file, but
apparently a (better?) alternative is to give a configuration file to
PyQt5 configure.py script.
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH 1/2] package/python-pyqt5: add qt optional dependencies
2019-08-19 12:39 ` [Buildroot] [PATCH 1/2] package/python-pyqt5: add qt optional dependencies Thomas Petazzoni
@ 2019-08-19 12:57 ` Fabrice Fontaine
2019-08-21 22:38 ` Arnout Vandecappelle
0 siblings, 1 reply; 5+ messages in thread
From: Fabrice Fontaine @ 2019-08-19 12:57 UTC (permalink / raw)
To: buildroot
Hello Thomas,
Le lun. 19 ao?t 2019 ? 14:39, Thomas Petazzoni
<thomas.petazzoni@bootlin.com> a ?crit :
>
> Hello,
>
> On Mon, 19 Aug 2019 00:46:46 +0200
> Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote:
>
> > python-pyqt5 optionally depends on qt5enginio, qt5location,
> > qt5multimedia, qt5quickcontrols, qt5quickcontrols2, qt5sensors,
> > qt5serialport, qt5svg, qt5webchannel, qt5webengine, qt5webkit,
> > qt5websockets and qt5x11extras
> >
> > Fixes:
> > - https://bugs.buildroot.org/show_bug.cgi?id=12121
> >
> > Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
>
> Thanks for looking so quickly into this bug report. I also had a look
> yesterday, and I think we should use the --enable option of PyQT5
> configure.py script, to force the list of modules we want to enable.
> This way, if one we enable does not work for some reason, the build
> will fail instead of silently ignoring it. It also prevents PyQt5 from
> automatically detecting which modules it should build.
I agree that this is a better solution however I'm not sufficiently
good in Qt to map all the PyQt modules to their respective
BR2_PACKAGE_QT5xxx variables (for example QtHelp, QtMultimediaWidgets,
...).
That's why I decided to just mess with the dependencies (with the
exception of QtQuick that must be disabled if opengl is not set)
>
> Also, on another note, I see we prefeed a qtdetail.out file, but
> apparently a (better?) alternative is to give a configuration file to
> PyQt5 configure.py script.
Again, as I'm not a Qt expert, I also missed this one ;-(.
>
> Thomas
> --
> Thomas Petazzoni, CTO, Bootlin
> Embedded Linux and Kernel engineering
> https://bootlin.com
Best Regards,
Fabrice
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH 1/2] package/python-pyqt5: add qt optional dependencies
2019-08-19 12:57 ` Fabrice Fontaine
@ 2019-08-21 22:38 ` Arnout Vandecappelle
0 siblings, 0 replies; 5+ messages in thread
From: Arnout Vandecappelle @ 2019-08-21 22:38 UTC (permalink / raw)
To: buildroot
On 19/08/2019 14:57, Fabrice Fontaine wrote:
> Hello Thomas,
>
> Le lun. 19 ao?t 2019 ? 14:39, Thomas Petazzoni
> <thomas.petazzoni@bootlin.com> a ?crit :
>>
>> Hello,
>>
>> On Mon, 19 Aug 2019 00:46:46 +0200
>> Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote:
>>
>>> python-pyqt5 optionally depends on qt5enginio, qt5location,
>>> qt5multimedia, qt5quickcontrols, qt5quickcontrols2, qt5sensors,
>>> qt5serialport, qt5svg, qt5webchannel, qt5webengine, qt5webkit,
>>> qt5websockets and qt5x11extras
>>>
>>> Fixes:
>>> - https://bugs.buildroot.org/show_bug.cgi?id=12121
>>>
>>> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
>>
>> Thanks for looking so quickly into this bug report. I also had a look
>> yesterday, and I think we should use the --enable option of PyQT5
>> configure.py script, to force the list of modules we want to enable.
>> This way, if one we enable does not work for some reason, the build
>> will fail instead of silently ignoring it. It also prevents PyQt5 from
>> automatically detecting which modules it should build.
I really wonder if that is worth the effort.
The only reason to do this would be to make sure we get the correct result
after changing the Buildroot config even if you don't do a clean build.
However, maintaining this explicit mapping of modules to packages and options
is very likely to go out of date at some point. And since the --enable option
bypasses the test for availability, that might not even lead to a build error.
In most cases, we install header files unconditionally, and I believe the
libraries get dlopen'ed.
Oops, but now I realize that the automatic detection won't even work... In many
cases, we install everything to staging, but selectively install to target
depending on Config.in options. So the automatic detection would consider a
module to be available while it doesn't actually get installed to target... Meh.
> I agree that this is a better solution however I'm not sufficiently
> good in Qt to map all the PyQt modules to their respective
> BR2_PACKAGE_QT5xxx variables (for example QtHelp, QtMultimediaWidgets,
Almost all of them should be pretty obvious, no?
Anyway, since we copy the libraries manually, you can usually just do a search
for the module (without Qt) in package/qt5. E.g. to find that Nfc is in
connectivity, you can grep for Nfc.
QtHelp is part of qt5tools but we don't install it.
QtMultimediaWidgets is part of qt5multimedia and is unconditionally installed.
Regards,
Arnout
> ...).
> That's why I decided to just mess with the dependencies (with the
> exception of QtQuick that must be disabled if opengl is not set)
>>
>> Also, on another note, I see we prefeed a qtdetail.out file, but
>> apparently a (better?) alternative is to give a configuration file to
>> PyQt5 configure.py script.
> Again, as I'm not a Qt expert, I also missed this one ;-(.
>>
>> Thomas
>> --
>> Thomas Petazzoni, CTO, Bootlin
>> Embedded Linux and Kernel engineering
>> https://bootlin.com
> Best Regards,
>
> Fabrice
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2019-08-21 22:38 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-08-18 22:46 [Buildroot] [PATCH 1/2] package/python-pyqt5: add qt optional dependencies Fabrice Fontaine
2019-08-18 22:46 ` [Buildroot] [PATCH 2/2] package/python-pyqt5: disable QtQuick module without opengl Fabrice Fontaine
2019-08-19 12:39 ` [Buildroot] [PATCH 1/2] package/python-pyqt5: add qt optional dependencies Thomas Petazzoni
2019-08-19 12:57 ` Fabrice Fontaine
2019-08-21 22:38 ` Arnout Vandecappelle
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox