@@ -90,10 +90,14 @@ def mpy_cross(mpy_cross_filename, circuitpython_tag, quiet=False):
9090def _munge_to_temp (original_path , temp_file , library_version ):
9191 with open (original_path , "rb" ) as original_file :
9292 for line in original_file :
93- line = line .decode ("utf-8" ).strip ("\n " )
94- if line .startswith ("__version__" ):
95- line = line .replace ("0.0.0-auto.0" , library_version )
96- temp_file .write (line .encode ("utf-8" ) + b"\r \n " )
93+ if original_path .endswith (".bin" ):
94+ # this is solely for adafruit_framebuf/examples/font5x8.bin
95+ temp_file .write (line )
96+ else :
97+ line = line .decode ("utf-8" ).strip ("\n " )
98+ if line .startswith ("__version__" ):
99+ line = line .replace ("0.0.0-auto.0" , library_version )
100+ temp_file .write (line .encode ("utf-8" ) + b"\r \n " )
97101 temp_file .flush ()
98102
99103def library (library_path , output_directory , mpy_cross = None , example_bundle = False ):
@@ -105,7 +109,7 @@ def library(library_path, output_directory, mpy_cross=None, example_bundle=False
105109 full_path = os .path .join (library_path , filename )
106110 if os .path .isdir (full_path ) and filename not in ["docs" ]:
107111 files = os .listdir (full_path )
108- files = filter (lambda x : x .endswith (".py" ), files )
112+ files = filter (lambda x : x .endswith (".py" ) or x . startswith ( "font5x8.bin" ) , files )
109113 files = map (lambda x : os .path .join (filename , x ), files )
110114 if filename .startswith ("examples" ):
111115 example_files .extend (files )
0 commit comments