From 95ba0bb7e8d9d18b70e0216b931f64878bf41a2e Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Pouiller?= Date: Tue, 20 Dec 2016 14:46:27 +0100 Subject: [PATCH] python3: remove full path from .pyc MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit .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 Signed-off-by: Thomas Petazzoni --- 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 6189aa8c7b..74f81167ff 100644 --- a/package/python3/python3.mk +++ b/package/python3/python3.mk @@ -247,9 +247,10 @@ endif define PYTHON3_CREATE_PYC_FILES $(PYTHON3_FIX_TIME) 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) -- 2.30.2