def buildAllTarballs(checkout, destination):
 if (not checkout.child('.svn').exists()):
  raise NotWorkingDirectory(('%s does not appear to be an SVN working directory.' % (checkout.path,)))
 if runCommand(['svn', 'st', checkout.path]).strip():
  raise UncleanWorkingDirectory(('There are local modifications to the SVN checkout in %s.' % (checkout.path,)))
 workPath = FilePath(mkdtemp())
 export = workPath.child('export')
 runCommand(['svn', 'export', checkout.path, export.path])
 twistedPath = export.child('twisted')
 version = Project(twistedPath).getVersion()
 versionString = version.base()
 apiBaseURL = ('http://twistedmatrix.com/documents/%s/api/%%s.html' % versionString)
 if (not destination.exists()):
  destination.createDirectory()
 db = DistributionBuilder(export, destination, apiBaseURL=apiBaseURL)
 db.buildCore(versionString)
 for subproject in twisted_subprojects:
  if twistedPath.child(subproject).exists():
   db.buildSubProject(subproject, versionString)
 db.buildTwisted(versionString)
 workPath.remove()

def buildAllTarballs ( checkout , destination ) : if ( not checkout . child ( '.svn' ) . exists ( ) ) : raise NotWorkingDirectory ( ( '%s does not appear to be an SVN working directory.' % ( checkout . path , ) ) ) if runCommand ( [ 'svn' , 'st' , checkout . path ] ) . strip ( ) : raise UncleanWorkingDirectory ( ( 'There are local modifications to the SVN checkout in %s.' % ( checkout . path , ) ) ) workPath = FilePath ( mkdtemp ( ) ) export = workPath . child ( 'export' ) runCommand ( [ 'svn' , 'export' , checkout . path , export . path ] ) twistedPath = export . child ( 'twisted' ) version = Project ( twistedPath ) . getVersion ( ) versionString = version . base ( ) apiBaseURL = ( 'http://twistedmatrix.com/documents/%s/api/%%s.html' % versionString ) if ( not destination . exists ( ) ) : destination . createDirectory ( ) db = DistributionBuilder ( export , destination , apiBaseURL = apiBaseURL ) db . buildCore ( versionString ) for subproject in twisted_subprojects : if twistedPath . child ( subproject ) . exists ( ) : db . buildSubProject ( subproject , versionString ) db . buildTwisted ( versionString ) workPath . remove ( )
build complete tarballs for twisted and all subprojects .