Skip to content

Commit 10eed78

Browse files
committed
use CFLAG to properly set define
1 parent b74e78d commit 10eed78

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

ports/stm32f4/mpconfigport.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ ifndef CIRCUITPY_DISPLAYIO
6969
CIRCUITPY_DISPLAYIO = 1
7070
endif
7171

72-
MICROPY_CPYTHON_COMPAT = 1
72+
CFLAGS += -DMICROPY_CPYTHON_COMPAT=1
7373

7474
#ifeq ($(MCU_SUB_VARIANT), stm32f412zx)
7575
#endif

py/circuitpy_mpconfig.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,10 @@ typedef long mp_off_t;
182182

183183
// Remove some lesser-used functionality to make small builds fit.
184184
#define MICROPY_BUILTIN_METHOD_CHECK_SELF_ARG (CIRCUITPY_FULL_BUILD)
185-
#define MICROPY_CPYTHON_COMPAT (CIRCUITPY_FULL_BUILD)
185+
//TODO: replace this with a rework of the FULL_BUILD system
186+
#if !defined(MICROPY_CPYTHON_COMPAT)
187+
#define MICROPY_CPYTHON_COMPAT (CIRCUITPY_FULL_BUILD)
188+
#endif
186189
#define MICROPY_MODULE_WEAK_LINKS (CIRCUITPY_FULL_BUILD)
187190
#define MICROPY_PY_ALL_SPECIAL_METHODS (CIRCUITPY_FULL_BUILD)
188191
#define MICROPY_PY_BUILTINS_COMPLEX (CIRCUITPY_FULL_BUILD)

0 commit comments

Comments
 (0)