[Buildroot] [PATCH 08/10] Remove .py or .pyc depending on Python configuration

Peter Korsgaard jacmet at uclibc.org
Mon Jan 24 21:20:45 UTC 2011


>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni at free-electrons.com> writes:

 Thomas> We do this at a global level since several packages can install
 Thomas> Python modules.

 Thomas> Signed-off-by: Thomas Petazzoni <thomas.petazzoni at free-electrons.com>
 Thomas> ---
 Thomas>  Makefile |    8 ++++++++
 Thomas>  1 files changed, 8 insertions(+), 0 deletions(-)

 Thomas> diff --git a/Makefile b/Makefile
 Thomas> index 7e08cf3..1f37a1f 100644
 Thomas> --- a/Makefile
 Thomas> +++ b/Makefile
 Thomas> @@ -438,6 +438,14 @@ ifneq ($(BR2_HAVE_DOCUMENTATION),y)
 Thomas>  	rm -rf $(TARGET_DIR)/usr/share/gtk-doc
 Thomas>  	-rmdir $(TARGET_DIR)/usr/share 2>/dev/null
 Thomas>  endif
 Thomas> +ifeq ($(BR2_PACKAGE_PYTHON),y)
 Thomas> +ifeq ($(BR2_PACKAGE_PYTHON_PY_ONLY),y)
 Thomas> +	find $(TARGET_DIR)/usr/lib/ -name '*.pyc' -print0 | xargs -0 rm -f
 Thomas> +endif
 Thomas> +ifeq ($(BR2_PACKAGE_PYTHON_PYC_ONLY),y)
 Thomas> +	find $(TARGET_DIR)/usr/lib/ -name '*.py' -print0 | xargs -0 rm -f
 Thomas> +endif
 Thomas> +endif

The outermost conditional is not really needed.

-- 
Bye, Peter Korsgaard


More information about the buildroot mailing list