#NEWLINE# def build( target_dir = 'dist' , release = 'dev' ) : #NEWLINE# #INDENT# os . chdir ( PROJECT_ROOT ) #NEWLINE# manifest = get_manifest ( ) #NEWLINE# name = ( manifest [ 'name' ] + '.sublime-package' ) #NEWLINE# target_dir = os . path . join ( PROJECT_ROOT , target_dir ) #NEWLINE# if ( not os . path . exists ( target_dir ) ) : #NEWLINE# #INDENT# os . mkdir ( target_dir ) #NEWLINE# #UNINDENT# target_file = os . path . join ( target_dir , release ) #NEWLINE# if os . path . exists ( target_file ) : #NEWLINE# #INDENT# os . unlink ( target_file ) #NEWLINE# #UNINDENT# with ZipFile ( target_file , 'a' , compression = ZIP_DEFLATED ) as package : #NEWLINE# #INDENT# for fn in ifind_files ( manifest [ 'include' ] [ release ] ) : #NEWLINE# #INDENT# package . write ( fn )