python-pyqt: fix PyQt_qreal_double enabling/disabling
PATCH v2 1/3 python-pyqt: fix PyQt_qreal_double enabling/disabling
From: Gwenhael Goavec-Merou <[email protected]>
fix :
http://autobuild.buildroot.net/results/6a2/6a28855c11b321ce8ceaf0acdd5395738af931fd/
http://autobuild.buildroot.net/results/91a/91a3641d1e4126475bbca0d3c779582832f6db91/
http://autobuild.buildroot.net/results/b10/b10fa70c199fc2de405068fea1eac80c29577747/
http://autobuild.buildroot.net/results/b53/b5334ac80afb58a19bd40b7c0b18378d75bc8fc7/
http://autobuild.buildroot.net/results/01f/01fa1319e467c3c2410fd462dc40c18b82dc8246/
http://autobuild.buildroot.net/results/2e6/2e6cae93ab860175c405e440bc7e24334b5b14e8/
According to configure-ng.py, PyQt_qreal_double must be disabled on ARM target and when QT_NO_FPU is set.
---
Changes v1 -> v2:
* disable PyQt_qreal_double for sh4, sh4a, sh4aeb and QWS & mips
--- package/python-pyqt/python-pyqt.mk | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-)
package/python-pyqt/python-pyqt.mk +12 -1
@@ -33,13 +33,24 @@ endif # Turn off features that aren't available in QWS and current qt # configuration. PYTHON_PYQT_QTDETAIL_DISABLE_FEATURES = \ - PyQt_Accessibility PyQt_SessionManager PyQt_qreal_double \ + PyQt_Accessibility PyQt_SessionManager \ PyQt_Shortcut PyQt_RawFont ifeq ($(BR2_PACKAGE_QT_OPENSSL),) PYTHON_PYQT_QTDETAIL_DISABLE_FEATURES += PyQt_OpenSSL endif +# PyQt_qreal_double must be disabled on ARM or when QT_NO_FPU is set +# QT_NO_FPU is set for ARM, SH4 and SH4A +ifeq ($(BR2_arm)$(BR2_armeb)$(BR2_sh4)$(BR2_sh4a)$(BR2_sh4aeb),y) +PYTHON_PYQT_QTDETAIL_DISABLE_FEATURES += PyQt_qreal_double +endif + +# QT_NO_FPU is also set for QWS on misp +ifeq ($(BR2_PACKAGE_QT_EMBEDDED)x$(BR2_mipsel)$(BR2_mips),yxy) +PYTHON_PYQT_QTDETAIL_DISABLE_FEATURES += PyQt_qreal_double +endif + define PYTHON_PYQT_QTDETAIL echo $(1) >> $(2)/qtdetail.out endef
Signature · 1 line
2.0.5
PATCH v2 2/3 python-pyqt: fix install
From: Gwenhael Goavec-Merou <[email protected]>
PyQt4 provides two version for some py files: one for python2.x and one for python3.x. This two versions are installed in TARGET_DIR.
After installing files, python is used to generate all .pyc files, but fails like :
class ProxyBase(metaclass=ProxyMetaclass):
^
SyntaxError: invalid syntax
This patch supdress directory for not targeted python version.
--- package/python-pyqt/python-pyqt.mk | 3 +++ 1 file changed, 3 insertions(+)
package/python-pyqt/python-pyqt.mk +3 -0
@@ -14,8 +14,10 @@ PYTHON_PYQT_DEPENDENCIES = python-sip host-python-sip qt ifeq ($(BR2_PACKAGE_PYTHON),y) PYTHON_PYQT_PYTHON_DIR = python$(PYTHON_VERSION_MAJOR) +PYTHON_PYQT_RM_PORT_BASE = port_v3 else ifeq ($(BR2_PACKAGE_PYTHON3),y) PYTHON_PYQT_PYTHON_DIR = python$(PYTHON3_VERSION_MAJOR) +PYTHON_PYQT_RM_PORT_BASE = port_v2 endif ifeq ($(BR2_PACKAGE_QT_EMBEDDED),y)
@@ -104,6 +106,7 @@ endef define PYTHON_PYQT_INSTALL_TARGET_CMDS $(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) install touch $(TARGET_DIR)/usr/lib/$(PYTHON_PYQT_PYTHON_DIR)/site-packages/PyQt4/__init__.py + $(RM) -rf $(TARGET_DIR)/usr/lib/$(PYTHON_PYQT_PYTHON_DIR)/site-packages/PyQt4/uic/$(PYTHON_PYQT_RM_PORT_BASE) PYTHONPATH="$(PYTHON_PATH)" \ $(HOST_DIR)/usr/bin/python -c "import compileall; \ compileall.compile_dir('$(TARGET_DIR)/usr/lib/$(PYTHON_PYQT_PYTHON_DIR)/site-packages/PyQt4')"
Signature · 1 line
2.0.5
PATCH v2 2/3 python-pyqt: fix install
Quoted 11 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Gwenhael" == Gwenhael Goavec-Merou <[email protected]> writes:
From: Gwenhael Goavec-Merou <[email protected]> PyQt4 provides two version for some py files: one for python2.x and one for python3.x. This two versions are installed in
TARGET_DIR.
After installing files, python is used to generate all .pyc files, but fails like :
class ProxyBase(metaclass=ProxyMetaclass):
^
SyntaxError: invalid syntax
Quoted 3 lines
This patch supdress directory for not targeted python version.
Signed-off-by Gwenhael Goavec-Merou <[email protected]>
Committed, thanks.
Signature · 1 line
Bye, Peter Korsgaard
PATCH v2 3/3 qt: fix webkit dependencies
In reply to Gwenhael Goavec-MerouFrom: Gwenhael Goavec-Merou <[email protected]>
fix:
http://autobuild.buildroot.net/results/ce8/ce89ad1ca6aec9f7bb5549301bf4c0dcba9e0e37/
qtwebkit includes qscript headers.
For packages like python-pyqt if webkit is available but not qscript, the compilation fails with :
buildroot/output/build/python-pyqt-4.11.3/sip/QtWebKit/qwebframe.sip:79:0:../../../host/usr/i686-buildroot-linux-gnu/sysroot/usr/include/QtWebKit/qwebframe.h:28:36:
fatal error: QtScript/qscriptengine.h: No such file or directory
This problem is not seen with Qt compilation because some relative include directly from sources are added.
--- package/qt/Config.in | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
package/qt/Config.in +3 -1
@@ -417,6 +417,7 @@ config BR2_PACKAGE_QT_ARCH_SUPPORTS_WEBKIT config BR2_PACKAGE_QT_WEBKIT bool "WebKit Module" + depends on BR2_PACKAGE_QT_SCRIPT depends on BR2_PACKAGE_QT_SHARED depends on BR2_PACKAGE_QT_GUI_MODULE depends on BR2_PACKAGE_QT_NETWORK
@@ -427,7 +428,8 @@ config BR2_PACKAGE_QT_WEBKIT If unsure, say n. comment "WebKit needs shared library/NPTL toolchain/gui/network support" - depends on !(BR2_PACKAGE_QT_SHARED && BR2_PACKAGE_QT_GUI_MODULE && BR2_PACKAGE_QT_NETWORK) + depends on !(BR2_PACKAGE_QT_SCRIPT && BR2_PACKAGE_QT_SHARED && \ + BR2_PACKAGE_QT_GUI_MODULE && BR2_PACKAGE_QT_NETWORK) depends on !BR2_TOOLCHAIN_HAS_THREADS_NPTL depends on BR2_PACKAGE_QT_ARCH_SUPPORTS_WEBKIT
Signature · 1 line
2.0.5
PATCH v2 3/3 qt: fix webkit dependencies
Quoted 34 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Gwenhael" == Gwenhael Goavec-Merou <[email protected]> writes:
From: Gwenhael Goavec-Merou <[email protected]> fix:
http://autobuild.buildroot.net/results/ce8/ce89ad1ca6aec9f7bb5549301bf4c0dcba9e0e37/qtwebkit includes qscript headers.
For packages like python-pyqt if webkit is available but not qscript, the compilation fails with :
buildroot/output/build/python-pyqt-4.11.3/sip/QtWebKit/qwebframe.sip:79:0:../../../host/usr/i686-buildroot-linux-gnu/sysroot/usr/include/QtWebKit/qwebframe.h:28:36:
fatal error:QtScript/qscriptengine.h: No such file or directoryThis problem is not seen with Qt compilation because some relative include directly from sources are added.
Signed-off-by Gwenhael Goavec-Merou <[email protected]>--- package/qt/Config.in | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)package/qt/Config.in +1
-0@@ -417,6 +417,7 @@ config BR2_PACKAGE_QT_ARCH_SUPPORTS_WEBKIT config BR2_PACKAGE_QT_WEBKIT bool "WebKit Module" + depends on BR2_PACKAGE_QT_SCRIPT depends on BR2_PACKAGE_QT_SHARED depends on BR2_PACKAGE_QT_GUI_MODULE depends on BR2_PACKAGE_QT_NETWORK
package/qt/Config.in config BR2_PACKAGE_QT_WEBKIT · line 432
Quoted 6 lines
package/qt/Config.in +2
-1@@ -427,7 +428,8 @@ config BR2_PACKAGE_QT_WEBKIT If unsure, say n. comment "WebKit needs shared library/NPTL toolchain/gui/network support" - depends on !(BR2_PACKAGE_QT_SHARED && BR2_PACKAGE_QT_GUI_MODULE && BR2_PACKAGE_QT_NETWORK) + depends on !(BR2_PACKAGE_QT_SCRIPT && BR2_PACKAGE_QT_SHARED && \ + BR2_PACKAGE_QT_GUI_MODULE && BR2_PACKAGE_QT_NETWORK)
You forgot to update the comment to mention the script module.
Committed with that fixed, thanks.
Signature · 1 line
Bye, Peter Korsgaard
PATCH v2 1/3 python-pyqt: fix PyQt_qreal_double enabling/disabling
In reply to Gwenhael Goavec-MerouDear Gwenhael Goavec-Merou,
package/python-pyqt/python-pyqt.mk endif · line 52
Quoted 10 lines · Gwenhael Goavec-Merou
package/python-pyqt/python-pyqt.mk +10
-0+# PyQt_qreal_double must be disabled on ARM or when QT_NO_FPU is set +# QT_NO_FPU is set for ARM, SH4 and SH4A +ifeq ($(BR2_arm)$(BR2_armeb)$(BR2_sh4)$(BR2_sh4a)$(BR2_sh4aeb),y) +PYTHON_PYQT_QTDETAIL_DISABLE_FEATURES += PyQt_qreal_double +endif + +# QT_NO_FPU is also set for QWS on misp +ifeq ($(BR2_PACKAGE_QT_EMBEDDED)x$(BR2_mipsel)$(BR2_mips),yxy) +PYTHON_PYQT_QTDETAIL_DISABLE_FEATURES += PyQt_qreal_double +endif
Can we introduce a hidden Config.in option instead, like:
BR2_PYTHON_PYQT_ARCH_USES_QREAL_FLOAT
bool default y if BR2_arm || BR2_armeb default y if BR2_sh4 || BR2_sh4eb || BR2_sh4a || BR2_sh4aeb default y if (BR2_mipsel || BR2_mips) && BR2_PACKAGE_QT_EMBEDDED
And then:
ifeq ($(BR2_PYTHON_PYQT_ARCH_USES_QREAL_FLOAT),y) PYTHON_PYQT_QTDETAIL_DISABLE_FEATURES += PyQt_qreal_double endif
Thanks,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
Thomas Petazzoni
AppliedPATCH v2 1/3 python-pyqt: fix PyQt_qreal_double enabling/disabling
In reply to Gwenhael Goavec-MerouDear Gwenhael Goavec-Merou,
Quoted 13 lines · Gwenhael Goavec-Merou
From: Gwenhael Goavec-Merou <[email protected]>
fix :
http://autobuild.buildroot.net/results/6a2/6a28855c11b321ce8ceaf0acdd5395738af931fd/
http://autobuild.buildroot.net/results/91a/91a3641d1e4126475bbca0d3c779582832f6db91/
http://autobuild.buildroot.net/results/b10/b10fa70c199fc2de405068fea1eac80c29577747/
http://autobuild.buildroot.net/results/b53/b5334ac80afb58a19bd40b7c0b18378d75bc8fc7/
http://autobuild.buildroot.net/results/01f/01fa1319e467c3c2410fd462dc40c18b82dc8246/
http://autobuild.buildroot.net/results/2e6/2e6cae93ab860175c405e440bc7e24334b5b14e8/According to
configure-ng.py,PyQt_qreal_doublemust be disabled on ARM target and whenQT_NO_FPUis set.
Quoted 7 lines
Signed-off-by Gwenhael Goavec-Merou <[email protected]>---
Changes v1 -> v2:
* disablePyQt_qreal_doublefor sh4, sh4a, sh4aeb and QWS & mips--- package/python-pyqt/python-pyqt.mk | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-)
I've applied after changing the logic to use a hidden Config.in boolean. Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com