Skip to content

Commit 1af1498

Browse files
committed
codal_port/main: Let sys.path/argv be initialised by mp_init.
When MicroPython was updated to v1.18 in commit 84d9668, frozen modules required ".frozen" to be in sys.path for the modules to be available to import. That path is added by default by mp_init(), so remove the override from mp_main(). Fixes issue #101. Signed-off-by: Damien George <damien@micropython.org>
1 parent 569e361 commit 1af1498

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

src/codal_port/main.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,6 @@ void mp_main(void) {
6464
gc_init(heap, heap + sizeof(heap));
6565
mp_init();
6666

67-
mp_obj_list_init(MP_OBJ_TO_PTR(mp_sys_path), 0);
68-
mp_obj_list_append(mp_sys_path, MP_OBJ_NEW_QSTR(MP_QSTR_));
69-
mp_obj_list_init(MP_OBJ_TO_PTR(mp_sys_argv), 0);
70-
7167
if (pyexec_mode_kind == PYEXEC_MODE_FRIENDLY_REPL) {
7268
const char *main_py = "main.py";
7369
if (mp_import_stat(main_py) == MP_IMPORT_STAT_FILE) {

0 commit comments

Comments
 (0)