def output_requirements(imports):
    logging.debug('Writing {num} requirements: {imports} to stdout'.format(num=len(imports), imports=', '.join([x['name'] for x in imports])))
    fmt = '{name}=={version}'
    print('\n'.join(((fmt.format(**item) if item['version'] else '{name}'.format(**item)) for item in imports)))
def output_requirements(imports):
    logging.debug('Writing {num} requirements: {imports} to stdout'.format(num=len(imports), imports=', '.join([x['name'] for x in imports])))
    fmt = '{name}=={version}'
    print('\n'.join(((fmt.format(**item) if item['version'] else '{name}'.format(**item)) for item in imports)))