diff options
| author | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2015-06-02 01:32:07 +0300 |
|---|---|---|
| committer | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2015-06-02 01:32:07 +0300 |
| commit | 9456732b86704adeefb4ef67612a2a9299c92677 (patch) | |
| tree | 0fa419523d6b52494273175f515953c81d008b13 /unix/Makefile | |
| parent | 2fc1e643199a97cd38142aaec80547227197db98 (diff) | |
unix: Include upip as fronzen modules inside the standard interpreter.
MicroPython doesn't come with standard library included, so it is important
to be able to easily install needed package in a seamless manner. Bundling
package manager (upip) inside an executable solves this issue.
upip is bundled only with standard executable, not "minimal" or "fast"
builds.
Diffstat (limited to 'unix/Makefile')
| -rw-r--r-- | unix/Makefile | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/unix/Makefile b/unix/Makefile index 2e4e679a3..af85a36e3 100644 --- a/unix/Makefile +++ b/unix/Makefile @@ -103,6 +103,13 @@ SRC_C = \ coverage.c \ $(SRC_MOD) +# Include builtin package manager in the standard build (and coverage) +ifeq ($(PROG),micropython) +SRC_C += $(BUILD)/_frozen_upip.c +else ifeq ($(PROG),micropython_coverage) +SRC_C += $(BUILD)/_frozen_upip.c +endif + LIB_SRC_C = $(addprefix lib/,\ $(LIB_SRC_C_EXTRA) \ ) @@ -153,3 +160,17 @@ coverage_test: coverage cd ../tests && MICROPY_MICROPYTHON=../$(DIRNAME)/micropython_coverage ./run-tests --emit native gcov -o build-coverage/py ../py/*.c gcov -o build-coverage/extmod ../extmod/*.c + +$(BUILD)/_frozen_upip.c: frozen_upip/upip.py + ../tools/make-frozen.py frozen_upip > $@ + +# Select latest upip version available +UPIP_TARBALL := $(shell ls -1 -v ../tools/micropython-upip-*.tar.gz | tail -n1) + +frozen_upip/upip.py: $(UPIP_TARBALL) + $(Q)rm -rf micropython-upip-* + $(ECHO) "MISC Preparing upip as frozen module" + $(Q)tar xfz $^ + $(Q)rm -rf frozen_upip + $(Q)mkdir -p frozen_upip + $(Q)cp micropython-upip-*/upip*.py frozen_upip/ |
