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

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