Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v3 1/2] python-pyqt: fix install
@ 2015-05-05 14:33 Gwenhael Goavec-Merou
  2015-05-05 14:33 ` [Buildroot] [PATCH v3 2/2] qt: fix webkit dependencies Gwenhael Goavec-Merou
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Gwenhael Goavec-Merou @ 2015-05-05 14:33 UTC (permalink / raw)
  To: buildroot

From: Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com>

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 is not a package build failure and this fix is only cosmetic.
This patch suppress directory for not targeted python version.

Signed-off-by: Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com>
---
 package/python-pyqt/python-pyqt.mk | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/package/python-pyqt/python-pyqt.mk b/package/python-pyqt/python-pyqt.mk
index c151dfd..d6587a8 100644
--- a/package/python-pyqt/python-pyqt.mk
+++ b/package/python-pyqt/python-pyqt.mk
@@ -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')"
-- 
2.0.5

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH v3 2/2] qt: fix webkit dependencies
  2015-05-05 14:33 [Buildroot] [PATCH v3 1/2] python-pyqt: fix install Gwenhael Goavec-Merou
@ 2015-05-05 14:33 ` Gwenhael Goavec-Merou
  2015-05-05 15:26 ` [Buildroot] [PATCH v3 1/2] python-pyqt: fix install Peter Korsgaard
  2015-05-17  7:05 ` Peter Korsgaard
  2 siblings, 0 replies; 6+ messages in thread
From: Gwenhael Goavec-Merou @ 2015-05-05 14:33 UTC (permalink / raw)
  To: buildroot

From: Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com>

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.

Signed-off-by: Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com>
---
 package/qt/Config.in | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/package/qt/Config.in b/package/qt/Config.in
index 43f5a0f..f6ca054 100644
--- a/package/qt/Config.in
+++ b/package/qt/Config.in
@@ -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
 
-- 
2.0.5

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH v3 1/2] python-pyqt: fix install
  2015-05-05 14:33 [Buildroot] [PATCH v3 1/2] python-pyqt: fix install Gwenhael Goavec-Merou
  2015-05-05 14:33 ` [Buildroot] [PATCH v3 2/2] qt: fix webkit dependencies Gwenhael Goavec-Merou
@ 2015-05-05 15:26 ` Peter Korsgaard
  2015-05-05 15:30   ` Thomas Petazzoni
  2015-05-17  7:05 ` Peter Korsgaard
  2 siblings, 1 reply; 6+ messages in thread
From: Peter Korsgaard @ 2015-05-05 15:26 UTC (permalink / raw)
  To: buildroot

>>>>> "Gwenhael" == Gwenhael Goavec-Merou <gwenj@trabucayre.com> writes:

 > From: Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com>
 > 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 is not a package build failure and this fix is only cosmetic.
 > This patch suppress directory for not targeted python version.

Do we have any autobuilder results showing this?

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH v3 1/2] python-pyqt: fix install
  2015-05-05 15:26 ` [Buildroot] [PATCH v3 1/2] python-pyqt: fix install Peter Korsgaard
@ 2015-05-05 15:30   ` Thomas Petazzoni
  2015-05-05 15:50     ` Peter Korsgaard
  0 siblings, 1 reply; 6+ messages in thread
From: Thomas Petazzoni @ 2015-05-05 15:30 UTC (permalink / raw)
  To: buildroot

Dear Peter Korsgaard,

On Tue, 05 May 2015 17:26:13 +0200, Peter Korsgaard wrote:

>  > This is not a package build failure and this fix is only cosmetic.
>  > This patch suppress directory for not targeted python version.
> 
> Do we have any autobuilder results showing this?

Read two lines before :-)

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH v3 1/2] python-pyqt: fix install
  2015-05-05 15:30   ` Thomas Petazzoni
@ 2015-05-05 15:50     ` Peter Korsgaard
  0 siblings, 0 replies; 6+ messages in thread
From: Peter Korsgaard @ 2015-05-05 15:50 UTC (permalink / raw)
  To: buildroot

>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:

 > Dear Peter Korsgaard,
 > On Tue, 05 May 2015 17:26:13 +0200, Peter Korsgaard wrote:

 >> > This is not a package build failure and this fix is only cosmetic.
 >> > This patch suppress directory for not targeted python version.
 >> 
 >> Do we have any autobuilder results showing this?

 > Read two lines before :-)

Doh, seems like I need more coffee.

-- 
Venlig hilsen,
Peter Korsgaard 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH v3 1/2] python-pyqt: fix install
  2015-05-05 14:33 [Buildroot] [PATCH v3 1/2] python-pyqt: fix install Gwenhael Goavec-Merou
  2015-05-05 14:33 ` [Buildroot] [PATCH v3 2/2] qt: fix webkit dependencies Gwenhael Goavec-Merou
  2015-05-05 15:26 ` [Buildroot] [PATCH v3 1/2] python-pyqt: fix install Peter Korsgaard
@ 2015-05-17  7:05 ` Peter Korsgaard
  2 siblings, 0 replies; 6+ messages in thread
From: Peter Korsgaard @ 2015-05-17  7:05 UTC (permalink / raw)
  To: buildroot

>>>>> "Gwenhael" == Gwenhael Goavec-Merou <gwenj@trabucayre.com> writes:

 > From: Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com>
 > 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 is not a package build failure and this fix is only cosmetic.
 > This patch suppress directory for not targeted python version.

 > Signed-off-by: Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com>

Sorry, just to be clear - It was the v3 versions I committed.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-05-17  7:05 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-05 14:33 [Buildroot] [PATCH v3 1/2] python-pyqt: fix install Gwenhael Goavec-Merou
2015-05-05 14:33 ` [Buildroot] [PATCH v3 2/2] qt: fix webkit dependencies Gwenhael Goavec-Merou
2015-05-05 15:26 ` [Buildroot] [PATCH v3 1/2] python-pyqt: fix install Peter Korsgaard
2015-05-05 15:30   ` Thomas Petazzoni
2015-05-05 15:50     ` Peter Korsgaard
2015-05-17  7:05 ` Peter Korsgaard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox