summaryrefslogtreecommitdiffstats
path: root/package/python/python.mk
diff options
context:
space:
mode:
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>2016-05-01 22:15:13 +0200
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>2016-05-17 22:46:29 +0200
commitf76543601ff21af23e2828fcb9b3262378120d78 (patch)
treed5c53b028e0a1a10c2c55b4e91ef10174c398a8b /package/python/python.mk
parent476f5fc8f6eba6ee44ce2e0812a1492609331f7d (diff)
downloadbuildroot-f76543601ff21af23e2828fcb9b3262378120d78.tar.gz
buildroot-f76543601ff21af23e2828fcb9b3262378120d78.zip
python: align the target finalize hooks with python3
Since the bump of python3 to 3.5.x, the target finalize hooks registered by the python3 have been changed a little bit. For the sake of consistency, this commit aligns the target finalize hooks registered by the python package so that they look the same as the ones used by python3. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Reviewed-by: Samuel Martin <s.martin49@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'package/python/python.mk')
-rw-r--r--package/python/python.mk8
1 files changed, 4 insertions, 4 deletions
diff --git a/package/python/python.mk b/package/python/python.mk
index 4ecd0d1d89..819d32b9d6 100644
--- a/package/python/python.mk
+++ b/package/python/python.mk
@@ -218,15 +218,15 @@ $(eval $(autotools-package))
$(eval $(host-autotools-package))
ifeq ($(BR2_PACKAGE_PYTHON_PYC_ONLY),y)
-define PYTHON_FINALIZE_TARGET
+define PYTHON_REMOVE_PY_FILES
find $(TARGET_DIR)/usr/lib/python$(PYTHON_VERSION_MAJOR) -name '*.py' -print0 | xargs -0 rm -f
endef
+TARGET_FINALIZE_HOOKS += PYTHON_REMOVE_PY_FILES
endif
ifeq ($(BR2_PACKAGE_PYTHON_PY_ONLY),y)
-define PYTHON_FINALIZE_TARGET
+define PYTHON_REMOVE_PYC_FILES
find $(TARGET_DIR)/usr/lib/python$(PYTHON_VERSION_MAJOR) -name '*.pyc' -print0 | xargs -0 rm -f
endef
+TARGET_FINALIZE_HOOKS += PYTHON_REMOVE_PYC_FILES
endif
-
-TARGET_FINALIZE_HOOKS += PYTHON_FINALIZE_TARGET
OpenPOWER on IntegriCloud