[Buildroot] [git commit] python3: remove full path from .pyc
Thomas Petazzoni
thomas.petazzoni at free-electrons.com
Sat Apr 1 16:31:19 UTC 2017
commit: https://git.buildroot.net/buildroot/commit/?id=95ba0bb7e8d9d18b70e0216b931f64878bf41a2e
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/master
.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 <jezz at sysmic.org>
Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout at mind.be>
Reviewed-by: Samuel Martin <s.martin49 at gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni at free-electrons.com>
---
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 6189aa8..74f8116 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)
More information about the buildroot
mailing list