From 8b014560f6fff100e89600f42f6882da0dcfe5b7 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Pouiller?= Date: Tue, 20 Dec 2016 14:46:26 +0100 Subject: [PATCH] python2: 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/python/python.mk | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/package/python/python.mk b/package/python/python.mk index e430d741c5..22d9141718 100644 --- a/package/python/python.mk +++ b/package/python/python.mk @@ -254,9 +254,10 @@ endif define PYTHON_CREATE_PYC_FILES $(PYTHON_FIX_TIME) PYTHONPATH="$(PYTHON_PATH)" \ - $(HOST_DIR)/usr/bin/python$(PYTHON_VERSION_MAJOR) \ - support/scripts/pycompile.py $(if $(BR2_REPRODUCIBLE),--force) \ - $(TARGET_DIR)/usr/lib/python$(PYTHON_VERSION_MAJOR) + cd $(TARGET_DIR) && $(HOST_DIR)/usr/bin/python$(PYTHON_VERSION_MAJOR) \ + $(TOPDIR)/support/scripts/pycompile.py \ + $(if $(BR2_REPRODUCIBLE),--force) \ + usr/lib/python$(PYTHON_VERSION_MAJOR) endef ifeq ($(BR2_PACKAGE_PYTHON_PYC_ONLY)$(BR2_PACKAGE_PYTHON_PY_PYC),y) -- 2.30.2