diff options
author | Maxime Ripard <maxime.ripard@free-electrons.com> | 2013-01-18 04:06:14 +0000 |
---|---|---|
committer | Peter Korsgaard <jacmet@sunsite.dk> | 2013-01-20 21:37:40 +0100 |
commit | 6ffab129a3ebc76caf7ae40caf1f6b0185f3e114 (patch) | |
tree | ae4882bc3155aa144a31e2e694f981e8aade436e /package | |
parent | 9976b37f86b03007efad8bb73e0fbd42e17add35 (diff) | |
download | buildroot-novena-6ffab129a3ebc76caf7ae40caf1f6b0185f3e114.tar.gz buildroot-novena-6ffab129a3ebc76caf7ae40caf1f6b0185f3e114.zip |
python3: Handle properly the pyc and py files on the target
Fixes #5690
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Acked-by: Samuel Martin <s.martin49@gmail.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Diffstat (limited to 'package')
-rw-r--r-- | package/python3/python3.mk | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/package/python3/python3.mk b/package/python3/python3.mk index 0d54162e8..e7c09837e 100644 --- a/package/python3/python3.mk +++ b/package/python3/python3.mk @@ -155,5 +155,27 @@ endef ifneq ($(BR2_PACKAGE_PYTHON),y) PYTHON3_POST_INSTALL_TARGET_HOOKS += PYTHON3_INSTALL_SYMLINK endif + +ifeq ($(BR2_PACKAGE_PYTHON3_PY_ONLY),y) +define PYTHON3_REMOVE_MODULES_FILES + for i in `find $(TARGET_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR) \ + -name __pycache__` ; do \ + rm -rf $$i ; \ + done +endef +endif + +ifeq ($(BR2_PACKAGE_PYTHON3_PYC_ONLY),y) +define PYTHON3_REMOVE_MODULES_FILES + for i in `find $(TARGET_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR) \ + -name *.py` ; do \ + rm -f $$i ; \ + done +endef +endif + +PYTHON3_POST_INSTALL_TARGET_HOOKS += PYTHON3_REMOVE_MODULES_FILES + + $(eval $(autotools-package)) $(eval $(host-autotools-package)) |