From patchwork Mon Apr 20 15:29:18 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: 462808 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 DDC671401E7 for ; Tue, 21 Apr 2015 01:27:23 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 6563E92DF8; Mon, 20 Apr 2015 15:27:21 +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 tjNyajUmpiw8; Mon, 20 Apr 2015 15:27:20 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 4E39092DFA; Mon, 20 Apr 2015 15:27:20 +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 51EC21C2863 for ; Mon, 20 Apr 2015 15:27:19 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 4D9CA92DFC for ; Mon, 20 Apr 2015 15:27:19 +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 4ZNR5RxMsCVO for ; Mon, 20 Apr 2015 15:27:18 +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 31E5F92DF9 for ; Mon, 20 Apr 2015 15:27:18 +0000 (UTC) Received: from x230.trabucayre.com (unknown [81.56.132.22]) by smtp2-g21.free.fr (Postfix) with ESMTP id 7DDCE4B0457; Mon, 20 Apr 2015 17:24:27 +0200 (CEST) From: Gwenhael Goavec-Merou To: buildroot@busybox.net Date: Mon, 20 Apr 2015 17:29:18 +0200 Message-Id: <1429543759-32207-2-git-send-email-gwenj@trabucayre.com> X-Mailer: git-send-email 2.0.5 In-Reply-To: <1429543759-32207-1-git-send-email-gwenj@trabucayre.com> References: <1429543759-32207-1-git-send-email-gwenj@trabucayre.com> Cc: Thomas Petazzoni , Gwenhael Goavec-Merou , "Yann E. MORIN" Subject: [Buildroot] [PATCH 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 808837e..e7ab3a6 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) @@ -97,6 +99,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')"