def build(<EOL>documentPath,<EOL>outputUFOFormatVersion=<NUM_LIT:3>,<EOL>roundGeometry=True,<EOL>verbose=True,           <EOL>logPath=None,           <EOL>progressFunc=None,      <EOL>processRules=True,<EOL>logger=None,<EOL>useVarlib=False,<EOL>):
import os, glob<EOL>if os.path.isdir(documentPath):<EOL><INDENT>todo = glob.glob(os.path.join(documentPath, "<STR_LIT>"))<EOL><DEDENT>else:<EOL><INDENT>todo = [documentPath]<EOL><DEDENT>results = []<EOL>for path in todo:<EOL><INDENT>document = DesignSpaceProcessor(ufoVersion=outputUFOFormatVersion)<EOL>document.useVarlib = useVarlib<EOL>document.roundGeometry = roundGeometry<EOL>document.read(path)<EOL>try:<EOL><INDENT>r = document.generateUFO(processRules=processRules)<EOL>results.append(r)<EOL><DEDENT>except:<EOL><INDENT>if logger:<EOL><INDENT>logger.exception("<STR_LIT>")<EOL><DEDENT><DEDENT>reader = None<EOL><DEDENT>return results<EOL>
Simple builder for UFO designspaces.