def main()

in build/install-build-deps.py [0:0]


def main(argv):
  parser = argparse.ArgumentParser()
  parser.add_argument('--quick-check', action='store_true',
                      help='quickly try to determine if dependencies are '
                           'installed (this avoids interactive prompts and '
                           'sudo commands so might not be 100% accurate)')
  parser.add_argument('--unsupported', action='store_true',
                      help='attempt installation even on unsupported systems')
  args = parser.parse_args(argv)

  lsb_codename = lsb_release_short_codename()
  if not args.unsupported and not args.quick_check:
    if lsb_codename not in list(map(
        operator.itemgetter('codename'), SUPPORTED_UBUNTU_VERSIONS)):
      supported_ubuntus = ['%(number)s (%(codename)s)' % v
                           for v in SUPPORTED_UBUNTU_VERSIONS]
      write_error('Only Ubuntu %s are currently supported.' %
                  ', '.join(supported_ubuntus))
      return 1

    if platform.machine() not in ('i686', 'x86_64'):
      write_error('Only x86 architectures are currently supported.')
      return 1

  if os.geteuid() != 0 and not args.quick_check:
    print('Running as non-root user.')
    print('You might have to enter your password one or more times')
    print('for \'sudo\'.')
    print()

  compute_dynamic_package_lists()

  packages = (_packages_dev + _packages_lib + _packages_dbg + _packages_lib32 +
              _packages_arm + _packages_nacl)
  def packages_key(pkg):
    s = pkg.rsplit(':', 1)
    if len(s) == 1:
      return (s, '')
    return s
  packages = sorted(set(packages), key=packages_key)

  if args.quick_check:
    return quick_check(packages)

  return 0