summaryrefslogtreecommitdiff
path: root/py
diff options
context:
space:
mode:
authorDan Halbert <halbert@halwitz.org>2018-01-02 21:25:41 -0500
committerDan Halbert <halbert@halwitz.org>2018-01-02 21:25:41 -0500
commit065e82015f0d2bd6732c62b7375fcc7af87fa0cf (patch)
treee48fa8caa5675d529d335a2b154e69eba8199cff /py
parentce81c8dda9686d3cd78d9c5383b6982c148ac7ec (diff)
merge from 2.2.0 + fix up board defs
Diffstat (limited to 'py')
-rw-r--r--py/makeversionhdr.py1
-rw-r--r--py/mkenv.mk1
-rw-r--r--py/mkrules.mk6
3 files changed, 5 insertions, 3 deletions
diff --git a/py/makeversionhdr.py b/py/makeversionhdr.py
index 30995f937..ebd887445 100644
--- a/py/makeversionhdr.py
+++ b/py/makeversionhdr.py
@@ -86,6 +86,7 @@ def make_version_header(filename):
#define MICROPY_VERSION_MINOR (%s)
#define MICROPY_VERSION_MICRO (%s)
#define MICROPY_VERSION_STRING "%s"
+#define MICROPY_FULL_VERSION_INFO ("Adafruit CircuitPython " MICROPY_GIT_TAG " on " MICROPY_BUILD_DATE "; " MICROPY_HW_BOARD_NAME " with " MICROPY_HW_MCU_NAME)
""" % (git_tag, git_hash, datetime.date.today().strftime("%Y-%m-%d"),
ver[0].replace('v', ''), ver[1], ver[2], version_string)
diff --git a/py/mkenv.mk b/py/mkenv.mk
index 5a118854a..5f8cd902b 100644
--- a/py/mkenv.mk
+++ b/py/mkenv.mk
@@ -70,6 +70,7 @@ endif
MAKE_FROZEN = $(TOP)/tools/make-frozen.py
MPY_CROSS = $(TOP)/mpy-cross/mpy-cross
MPY_TOOL = $(TOP)/tools/mpy-tool.py
+PREPROCESS_FROZEN_MODULES = PYTHONPATH=$(TOP)/tools/python-semver $(TOP)/tools/preprocess_frozen_modules.py
all:
.PHONY: all
diff --git a/py/mkrules.mk b/py/mkrules.mk
index a7a2d492a..7385ad57a 100644
--- a/py/mkrules.mk
+++ b/py/mkrules.mk
@@ -114,13 +114,13 @@ $(MPY_CROSS): $(TOP)/py/*.[ch] $(TOP)/mpy-cross/*.[ch] $(TOP)/ports/windows/fmod
$(Q)$(MAKE) -C $(TOP)/mpy-cross
# 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.
+# Do any preprocessing necessary: currently, this adds version information, removes examples, and
+# non-library .py files in the modules (setup.py and conf.py)
# 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)$(PREPROCESS_FROZEN_MODULES) -o $@ $(FROZEN_MPY_DIRS)
$(Q)$(CD) $@ && \
$(FIND) -L . -type f -name '*.py' | sed 's=^\./==' | \
xargs -n1 $(abspath $(MPY_CROSS)) $(MPY_CROSS_FLAGS)