Put .frozen back in sys.path, if frozen modules exist

This commit is contained in:
Jeff Epler 2022-02-16 20:03:49 -06:00
parent 8f59364a11
commit a0fa536a55
No known key found for this signature in database
GPG Key ID: D5BF15AB975AB4DE

3
main.c
View File

@ -162,6 +162,9 @@ STATIC void start_mp(supervisor_allocation *heap, bool first_run) {
mp_obj_list_init((mp_obj_list_t *)mp_sys_path, 0);
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_));
#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__slash_lib));
mp_obj_list_init((mp_obj_list_t *)mp_sys_argv, 0);