From: Jérôme Pouiller Date: Tue, 20 Dec 2016 13:46:26 +0000 (+0100) Subject: python2: remove full path from .pyc X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8b014560f6fff100e89600f42f6882da0dcfe5b7;p=buildroot.git python2: remove full path from .pyc .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 --- 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)