diff options
author | Jérôme Pouiller <jezz@sysmic.org> | 2016-12-20 14:46:26 +0100 |
---|---|---|
committer | Thomas Petazzoni <thomas.petazzoni@free-electrons.com> | 2017-04-01 18:30:07 +0200 |
commit | 8b014560f6fff100e89600f42f6882da0dcfe5b7 (patch) | |
tree | 9638b92b1a4b389f52a88dd77c0ba17e10035d14 | |
parent | 8607ae919dc70bacfd7041db7aa613e14b2e7463 (diff) | |
download | buildroot-8b014560f6fff100e89600f42f6882da0dcfe5b7.tar.gz buildroot-8b014560f6fff100e89600f42f6882da0dcfe5b7.zip |
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 <jezz@sysmic.org>
Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Reviewed-by: Samuel Martin <s.martin49@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
-rw-r--r-- | package/python/python.mk | 7 |
1 files 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) |