From patchwork Tue Dec 20 13:46:27 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= X-Patchwork-Id: 707443 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3tjfJD2v3Jz9t0m for ; Wed, 21 Dec 2016 00:48:28 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id A5B052FE80; Tue, 20 Dec 2016 13:48:26 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id fsnF5V34ydEc; Tue, 20 Dec 2016 13:48:22 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 1B0392FEF3; Tue, 20 Dec 2016 13:47:29 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id F020A1BFA57 for ; Tue, 20 Dec 2016 13:46:57 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id EB98985443 for ; Tue, 20 Dec 2016 13:46:57 +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 7WSB81I2eI8D for ; Tue, 20 Dec 2016 13:46:55 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from lupi.sysmic.org (sysmic.org [62.210.89.17]) by whitealder.osuosl.org (Postfix) with ESMTPS id 5DCE98552E for ; Tue, 20 Dec 2016 13:46:55 +0000 (UTC) Received: from lupi.online.net (sysmic.org [62.210.89.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: jezz) by lupi.sysmic.org (Postfix) with ESMTPSA id 367FA4305D; Tue, 20 Dec 2016 14:46:52 +0100 (CET) From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Pouiller?= To: buildroot@busybox.net Date: Tue, 20 Dec 2016 14:46:27 +0100 Message-Id: <1482241596-31688-11-git-send-email-jezz@sysmic.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1482241596-31688-1-git-send-email-jezz@sysmic.org> References: <1482241596-31688-1-git-send-email-jezz@sysmic.org> MIME-Version: 1.0 Cc: Thomas Petazzoni , =?UTF-8?q?J=C3=A9r=C3=B4me=20Pouiller?= Subject: [Buildroot] [PATCH v5 10/19] python3: remove full path from .pyc 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: , Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" .pyc files include path to source .py file. This patch changes the way `pycompile.py' is launched in order to only keep the part relative to $TARGET_DIR. This work was sponsored by `BA Robotic Systems'. Signed-off-by: Jérôme Pouiller Reviewed-by: Arnout Vandecappelle (Essensium/Mind) Reviewed-by: Samuel Martin --- Notes: v3: - Typo in commit log (Arnout) package/python3/python3.mk | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/package/python3/python3.mk b/package/python3/python3.mk index 1817b22..2562be7 100644 --- a/package/python3/python3.mk +++ b/package/python3/python3.mk @@ -237,9 +237,10 @@ endif define PYTHON3_CREATE_PYC_FILES PYTHONPATH="$(PYTHON3_PATH)" \ - $(HOST_DIR)/usr/bin/python$(PYTHON3_VERSION_MAJOR) \ - support/scripts/pycompile.py $(if $(BR2_REPRODUCIBLE),--force) \ - $(TARGET_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR) + cd $(TARGET_DIR) && $(HOST_DIR)/usr/bin/python$(PYTHON3_VERSION_MAJOR) \ + $(TOPDIR)/support/scripts/pycompile.py \ + $(if $(BR2_REPRODUCIBLE),--force) \ + usr/lib/python$(PYTHON3_VERSION_MAJOR) endef ifeq ($(BR2_PACKAGE_PYTHON3_PYC_ONLY)$(BR2_PACKAGE_PYTHON3_PY_PYC),y)