From 91c6a2128e54b58dfbbe406e85a29671e8dee8f3 Mon Sep 17 00:00:00 2001 From: Josh Klar Date: Sun, 23 Sep 2018 00:45:55 -0700 Subject: [PATCH] Build the Unix port of MicroPython so we can sanity-check layouts using the actual target Python, rather than CPython with all its niceties --- Makefile | 12 ++++++++++++ micropython.sh | 5 +++++ 2 files changed, 17 insertions(+) create mode 100755 micropython.sh diff --git a/Makefile b/Makefile index 1ac3daf..16def45 100644 --- a/Makefile +++ b/Makefile @@ -41,10 +41,22 @@ circuitpy-deps: .circuitpy-deps micropython-deps: .micropython-deps +vendor/micropython/ports/unix/micropython: vendor/micropython/ports/unix/modules/.kmk_frozen + @make -j4 -C vendor/micropython/ports/unix + +micropython-build-unix: vendor/micropython/ports/unix/micropython + freeze-nrf-vendor-deps: vendor/circuitpython/ports/nrf/freeze/.kmk_frozen freeze-teensy3.1-vendor-deps: vendor/micropython/ports/teensy/freeze/.kmk_frozen freeze-stm32-vendor-deps: vendor/micropython/ports/stm32/freeze/.kmk_frozen +vendor/micropython/ports/unix/modules/.kmk_frozen: upy-freeze.txt + @echo "===> Preparing vendored dependencies for local development" + @rm -rf vendored_libs + @mkdir -p vendored_libs + @cat $< | xargs -I '{}' cp -a {} vendor/micropython/ports/unix/modules/ + @touch $@ + vendor/circuitpython/ports/nrf/freeze/.kmk_frozen: upy-freeze.txt @echo "===> Preparing vendored dependencies for bundling" @rm -rf vendor/circuitpython/ports/nrf/freeze/* diff --git a/micropython.sh b/micropython.sh new file mode 100755 index 0000000..a155194 --- /dev/null +++ b/micropython.sh @@ -0,0 +1,5 @@ +if [ ! -f vendor/micropython/ports/unix/micropython ]; then + make micropython-build-unix +fi + +vendor/micropython/ports/unix/micropython $@