File tree Expand file tree Collapse file tree 2 files changed +29
-1
lines changed Expand file tree Collapse file tree 2 files changed +29
-1
lines changed Original file line number Diff line number Diff line change 1010
1111jobs :
1212 build-images :
13- runs-on : ubuntu-20 .04
13+ runs-on : ubuntu-24 .04
1414 steps :
1515 - uses : actions/checkout@v2
16+ - run : python3 -m venv build_images_venv
17+ - name : Activate virtualenv
18+ run : |
19+ . build_images_venv/bin/activate
20+ echo PATH=$PATH >> $GITHUB_ENV
1621 - run : python3 -mpip install -r requirements.txt
1722 - run : git clone --depth=1 https://github.com/adafruit/Adafruit_Learning_System_Guides learn
1823 - run : env LEARN_GUIDE_REPO=learn/ python3 create_requirement_images.py
Original file line number Diff line number Diff line change @@ -395,6 +395,29 @@ def make_sd_dir(position):
395395 triangle_icon = right_triangle ,
396396 )
397397
398+ def filter_custom_project_libs (project_file_set ):
399+ """
400+ Find and remove the custom project lib folder.
401+ Returns a tuple with the contents of the custom project lib folder
402+ which will in turn get included in the libraries list that the
403+ tool uses to generate the "main" lib folder in the screenshot.
404+ """
405+ _custom_libs = tuple ()
406+ remove_files = []
407+ for file in project_file_set :
408+ if not isinstance (file , tuple ):
409+ continue
410+ if file [0 ] == "lib" :
411+ _custom_libs = file [1 ]
412+ remove_files .append (file )
413+ for file in remove_files :
414+ project_file_set .remove (file )
415+ return _custom_libs
416+
417+ custom_libs = filter_custom_project_libs (project_files )
418+ libs_list = list (libs )
419+ libs_list .extend (custom_libs )
420+ libs = set (libs_list )
398421 final_list_to_render = sort_libraries (libs )
399422 if settings_required (final_list_to_render ):
400423 context ["added_settings_toml" ] = True
You can’t perform that action at this time.
0 commit comments