ports: Add '.frozen' as the first entry in sys.path.
Frozen modules will be searched preferentially, but gives the user the ability to override this behavior. This matches the previous behavior where "" was implicitly the frozen search path, but the frozen list was checked before the filesystem. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
This commit is contained in:
committed by
Damien George
parent
d6d4a5819b
commit
86ce442607
@@ -53,6 +53,9 @@ STATIC void mp_reset(void) {
|
||||
gc_init(heap, heap + sizeof(heap));
|
||||
mp_init();
|
||||
mp_obj_list_init(mp_sys_path, 0);
|
||||
#if MICROPY_MODULE_FROZEN
|
||||
mp_obj_list_append(mp_sys_path, MP_OBJ_NEW_QSTR(MP_QSTR__dot_frozen));
|
||||
#endif
|
||||
mp_obj_list_append(mp_sys_path, MP_OBJ_NEW_QSTR(MP_QSTR_)); // current dir (or base dir of the script)
|
||||
mp_obj_list_append(mp_sys_path, MP_OBJ_NEW_QSTR(MP_QSTR__slash_lib));
|
||||
mp_obj_list_append(mp_sys_path, MP_OBJ_NEW_QSTR(MP_QSTR__slash_));
|
||||
|
||||
Reference in New Issue
Block a user