def parse_requirements(*filenames):
    requirements = []
    for f in filenames:
        for line in open(f, 'r').read().split('\n'):
            # Comment lines. Skip.
            if re.match(r'(\s*#)|(\s*$)', line):
                continue
            # Editable matches. Put the egg name into our reqs list.
            if re.match(r'\s*-e\s+', line):
                pkg = re.sub(r'\s*-e\s+.*#egg=(.*)$', r'\1', line)
                requirements.append("%s" % pkg)
            # File-based installs not supported/needed. Skip.
            elif re.match(r'\s*-f\s+', line):
                pass
            else:
                requirements.append(line)
    return requirements
Set an object's tags.
dataset/ETHPy150Open tonioo/modoboa/setup.py/parse_requirements--crossover with--dataset/ETHPy150Open amarandon/smeuhsocial/apps/tagging/fields.py/TagField.__set__