@@ -26,14 +26,16 @@ def _unpack_args(args):
2626 '''Unpack command line arguments
2727 '''
2828 return args .appdir , args .name , args .python_version , args .linux_tag , \
29- args .python_tag , args .base_image , args .in_tree_build , args .extra_files
29+ args .python_tag , args .base_image , args .in_tree_build , \
30+ args .extra_data
3031
3132
3233_tag_pattern = re .compile ('python([^-]+)[-]([^.]+)[.]AppImage' )
3334_linux_pattern = re .compile ('manylinux([0-9]+)_' + platform .machine ())
3435
3536def execute (appdir , name = None , python_version = None , linux_tag = None ,
36- python_tag = None , base_image = None , in_tree_build = False , extra_files = None ):
37+ python_tag = None , base_image = None , in_tree_build = False ,
38+ extra_data = None ):
3739 '''Build a Python application using a base AppImage
3840 '''
3941
@@ -287,10 +289,15 @@ def execute(appdir, name=None, python_version=None, linux_tag=None,
287289 '--no-warn-script-location' , requirement ),
288290 exclude = (deprecation + git_warnings ))
289291
290- # Bundle auxilliary application files
291- if extra_files is not None :
292- log ('BUNDLE' , os .path .basename (extra_files ))
293- copy_tree (extra_files , 'AppDir/' )
292+ # Bundle auxilliary application data
293+ if extra_data is not None :
294+ for path in extra_data :
295+ basename = os .path .basename (path )
296+ log ('BUNDLE' , basename )
297+ if os .path .isdir (path ):
298+ copy_tree (path , 'AppDir/' + basename )
299+ else :
300+ copy_file (path , 'AppDir/' )
294301
295302 # Bundle the entry point
296303 entrypoint_path = glob .glob (appdir + '/entrypoint.*' )
0 commit comments