def build_and_install_packages(packages, install_dir):
 errors = []
 for package in packages:
  if (not package.build_and_install(install_dir)):
   msg = ('Unable to build and install %s' % package.name)
   logging.error(msg)
   errors.append(msg)
 return errors

def build_and_install_packages ( packages , install_dir ) : errors = [ ] for package in packages : if ( not package . build_and_install ( install_dir ) ) : msg = ( 'Unable to build and install %s' % package . name ) logging . error ( msg ) errors . append ( msg ) return errors
builds and installs all packages into install_dir .