From patchwork Tue May 5 14:33:53 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gwenhael Goavec-Merou X-Patchwork-Id: 468133 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from fraxinus.osuosl.org (fraxinus.osuosl.org [140.211.166.137]) by ozlabs.org (Postfix) with ESMTP id 54BA414077B for ; Wed, 6 May 2015 00:37:26 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 66931A2DD9; Tue, 5 May 2015 14:37:25 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id oeT1ZXXVIiug; Tue, 5 May 2015 14:37:23 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 6FB01A2DBC; Tue, 5 May 2015 14:37:23 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 6F5911C2343 for ; Tue, 5 May 2015 14:37:22 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 6B851913B0 for ; Tue, 5 May 2015 14:37:22 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id AemERyhMFo63 for ; Tue, 5 May 2015 14:37:20 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.7.6 Received: from smtp2-g21.free.fr (smtp2-g21.free.fr [212.27.42.2]) by whitealder.osuosl.org (Postfix) with ESMTPS id C2744913BD for ; Tue, 5 May 2015 14:37:20 +0000 (UTC) Received: from serveur.trabucayre.com (unknown [81.56.132.22]) by smtp2-g21.free.fr (Postfix) with ESMTP id D5E404B01FD; Tue, 5 May 2015 16:36:40 +0200 (CEST) From: Gwenhael Goavec-Merou To: buildroot@busybox.net Date: Tue, 5 May 2015 16:33:53 +0200 Message-Id: <1430836434-24257-1-git-send-email-gwenj@trabucayre.com> X-Mailer: git-send-email 2.1.4 Cc: Thomas Petazzoni , Gwenhael Goavec-Merou , "Yann E. MORIN" Subject: [Buildroot] [PATCH v3 1/2] python-pyqt: fix install X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" From: Gwenhael Goavec-Merou 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 --- 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')"