From patchwork Sat Apr 25 10:41:17 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: 464483 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ozlabs.org (Postfix) with ESMTP id 4E1EF14012F for ; Sat, 25 Apr 2015 20:39:23 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 4D511918D6; Sat, 25 Apr 2015 10:39: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 Qegrt9Qzlxer; Sat, 25 Apr 2015 10:39:19 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id B2C10917C1; Sat, 25 Apr 2015 10:39:19 +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 7FDFC1C0E31 for ; Sat, 25 Apr 2015 10:39:18 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 7B7F591213 for ; Sat, 25 Apr 2015 10:39:18 +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 Go2-OndpH7dq for ; Sat, 25 Apr 2015 10:39:17 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.7.6 Received: from smtp4-g21.free.fr (smtp4-g21.free.fr [212.27.42.4]) by whitealder.osuosl.org (Postfix) with ESMTPS id 3F7CD917C1 for ; Sat, 25 Apr 2015 10:39:17 +0000 (UTC) Received: from x230.trabucayre.com (unknown [82.226.196.129]) by smtp4-g21.free.fr (Postfix) with ESMTP id 7FF9D4C80BB; Sat, 25 Apr 2015 12:36:42 +0200 (CEST) From: Gwenhael Goavec-Merou To: buildroot@busybox.net Date: Sat, 25 Apr 2015 12:41:17 +0200 Message-Id: <1429958478-29114-2-git-send-email-gwenj@trabucayre.com> X-Mailer: git-send-email 2.0.5 In-Reply-To: <1429958478-29114-1-git-send-email-gwenj@trabucayre.com> References: <1429958478-29114-1-git-send-email-gwenj@trabucayre.com> Cc: Thomas Petazzoni , Gwenhael Goavec-Merou , "Yann E. MORIN" Subject: [Buildroot] [PATCH v2 2/3] 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 patch supdress 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')"