From 632d43ed44afec4c3dd16429077fe6505bf2733d Mon Sep 17 00:00:00 2001 From: Laurens Valk Date: Tue, 29 Nov 2022 12:31:09 +0100 Subject: [PATCH] py/mpconfig: Include micropython module in core features. This excludes it from the minimal builds. Signed-off-by: Laurens Valk --- py/mpconfig.h | 2 +- tests/basics/nanbox_smallint.py | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/py/mpconfig.h b/py/mpconfig.h index 62c123bc0b..765a8f45ce 100644 --- a/py/mpconfig.h +++ b/py/mpconfig.h @@ -1313,7 +1313,7 @@ typedef double mp_float_t; // Whether to provide "micropython" module #ifndef MICROPY_PY_MICROPYTHON -#define MICROPY_PY_MICROPYTHON (1) +#define MICROPY_PY_MICROPYTHON (MICROPY_CONFIG_ROM_LEVEL_AT_LEAST_CORE_FEATURES) #endif // Whether to provide "gc" module diff --git a/tests/basics/nanbox_smallint.py b/tests/basics/nanbox_smallint.py index 167b196010..b3a502e447 100644 --- a/tests/basics/nanbox_smallint.py +++ b/tests/basics/nanbox_smallint.py @@ -1,6 +1,10 @@ # Test creating small integers without heap allocation in nan-boxing mode. -import micropython +try: + import micropython +except ImportError: + print("SKIP") + raise SystemExit try: # Test for nan-box build by allocating a float while heap is locked.