def jam(filename):
    packages = {}
    try:
        with open(filename, 'r') as infile:
            infile.seek(0)
            for line in infile.readlines():
                if line.startswith(u'-e '):
                    package, version = (line.strip(), '')
                    packages[package] = version
                elif '==' in line:
                    package, version = line.strip().split(u'==')
                    packages[package] = version
                else:
                    packages[line.strip()] = 'latest'

    except __HOLE__:
        click.echo('File {} not found.'.format(filename))

    infile.close()
    return packages
dataset/ETHPy150Open hactar-is/olaf/olaf/cli.py/jam