From 22bbb6ab86fd1b843e03fb2474f69e6118c8aaad Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Wed, 20 Dec 2017 11:01:58 -0500 Subject: [PATCH] Don't include examples directories in frozen libraries --- py/mkrules.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/py/mkrules.mk b/py/mkrules.mk index 656ffd03cb..1b33555128 100644 --- a/py/mkrules.mk +++ b/py/mkrules.mk @@ -115,12 +115,13 @@ $(MPY_CROSS): $(TOP)/py/*.[ch] $(TOP)/mpy-cross/*.[ch] $(TOP)/windows/fmode.c # Copy all the modules and single python files to freeze to a common area, omitting top-level dirs (the repo names). # Remove any conf.py (sphinx config) and setup.py (module install info) files, which are not meant to be frozen. +# Also remove the library examples directory, so it won't be included. # Then compile .mpy files from all the .py files, placing them in the same directories as the .py files. $(BUILD)/frozen_mpy: $(FROZEN_MPY_DIRS) $(ECHO) FREEZE $(FROZEN_MPY_DIRS) $(Q)$(MKDIR) -p $@ $(Q)$(RSYNC) -rL --include="*/" --include='*.py' --exclude="*" $(addsuffix /*,$(FROZEN_MPY_DIRS)) $@ - $(Q)$(RM) -f $@/conf.py $@/setup.py + $(Q)$(RM) -rf $@/conf.py $@/setup.py $@/examples $(Q)$(CD) $@ && \ $(FIND) -L . -type f -name '*.py' | sed 's=^\./==' | \ xargs -n1 $(abspath $(MPY_CROSS)) $(MPY_CROSS_FLAGS)