10000 Merge pull request #1314 from dhalbert/3.x-frozen-before-lib · sparkfun/circuitpython@fa1edb2 · GitHub
[go: up one dir, main page]

Skip to content

Commit fa1edb2

Browse files
authored
Merge pull request adafruit#1314 from dhalbert/3.x-frozen-before-lib
3.x: put .frozen before /lib in sys.path; update frozen libraries
2 parents af7a0ee + 4dfba2f commit fa1edb2

15 files changed

+18
-14
lines changed

main.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,10 @@ void reset_mp(void) {
9292
mp_obj_list_init(mp_sys_path, 0);
9393
mp_obj_list_append(mp_sys_path, MP_OBJ_NEW_QSTR(MP_QSTR_)); // current dir (or base dir of the script)
9494
mp_obj_list_append(mp_sys_path, MP_OBJ_NEW_QSTR(MP_QSTR__slash_));
95-
mp_obj_list_append(mp_sys_path, MP_OBJ_NEW_QSTR(MP_QSTR__slash_lib));
9695
// Frozen modules are in their own pseudo-dir, e.g., ".frozen".
96+
// Prioritize .frozen over /lib.
9797
mp_obj_list_append(mp_sys_path, MP_OBJ_NEW_QSTR(MP_FROZEN_FAKE_DIR_QSTR));
98+
mp_obj_list_append(mp_sys_path, MP_OBJ_NEW_QSTR(MP_QSTR__slash_lib));
9899

99100
mp_obj_list_init(mp_sys_argv, 0);
100101
}

ports/atmel-samd/boards/pirkey_m0/mpconfigboard.mk

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ LONGINT_IMPL = NONE
1010
CHIP_VARIANT = SAMD21E18A
1111
CHIP_FAMILY = samd21
1212

13+
CFLAGS_INLINE_LIMIT = 45
14+
1315
# Include these Python libraries in firmware.
1416
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_DotStar
1517
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_HID

ports/esp8266/main.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,11 @@ STATIC void mp_reset(void) {
9595
mp_init();
9696
mp_obj_list_init(mp_sys_path, 0);
9797
mp_obj_list_append(mp_sys_path, MP_OBJ_NEW_QSTR(MP_QSTR_)); // current dir (or base dir of the script)
98-
mp_obj_list_append(mp_sys_path, MP_OBJ_NEW_QSTR(MP_QSTR__slash_lib));
9998
mp_obj_list_append(mp_sys_path, MP_OBJ_NEW_QSTR(MP_QSTR__slash_));
10099
// Frozen modules are in their own pseudo-dir, e.g., ".frozen".
100+
// Prioritize .frozen over /lib.
101101
mp_obj_list_append(mp_sys_path, MP_OBJ_NEW_QSTR(MP_FROZEN_FAKE_DIR_QSTR));
102+
mp_obj_list_append(mp_sys_path, MP_OBJ_NEW_QSTR(MP_QSTR__slash_lib));
102103

103104
mp_obj_list_init(mp_sys_argv, 0);
104105

tools/preprocess_frozen_modules.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def copy_and_process(in_dir, out_dir):
3333
for root, subdirs, files in os.walk(in_dir):
3434

3535
# Skip library examples directories.
36-
if Path(root).name in ['examples', 'docs']:
36+
if Path(root).name in ['examples', 'tests', 'docs']:
3737
continue
3838

3939
for file in files:

0 commit comments

Comments
 (0)
0