#NEWLINE# def make_package( pubspec = True , dirs = [ 'web' ] ) : #NEWLINE# #INDENT# 'Helper to create a folder structure resembling a pub-compliant package.\n\n    @pubspec\n      Whether to create a pubspec.yaml file.\n\n    @dirs\n      List of subdirs to create within the package.\n    ' #NEWLINE# tmp_dir = TemporaryDirectory ( ) #NEWLINE# pubspec_path = '' #NEWLINE# if pubspec : #NEWLINE# #INDENT# pubspec_path = os . path . join ( tmp_dir . name , 'pubspec.yaml' ) #NEWLINE# open ( pubspec_path , 'w' ) . close ( ) #NEWLINE# #UNINDENT# for subdir in dirs : #NEWLINE# #INDENT# os . mkdir ( os . path . join ( tmp_dir . name , subdir ) ) #NEWLINE# #UNINDENT# return ( pubspec_path , tmp_dir )