diff options
| author | Dan Halbert <halbert@halwitz.org> | 2017-12-20 11:01:58 -0500 |
|---|---|---|
| committer | Scott Shawcroft <scott@tannewt.org> | 2017-12-20 09:00:45 -0800 |
| commit | 22bbb6ab86fd1b843e03fb2474f69e6118c8aaad (patch) | |
| tree | b2fb22b7cd757bd3ad68dc4820a3dc41d51eb7c1 | |
| parent | 7f8972b842916e13540869af56522fb3bb577d32 (diff) | |
Don't include examples directories in frozen libraries
| -rw-r--r-- | py/mkrules.mk | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/py/mkrules.mk b/py/mkrules.mk index 656ffd03c..1b3355512 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) |
