def package_to_requirement(package_name):
    match = re.search(r'^(.*?)-(dev|\d.*)', package_name)
    if match:
        name = match.group(1)
        version = match.group(2)
    else:
        name = package_name
        version = ''
    if version:
        return '%s==%s' % (name, version)
    else:
        return name
Copies this task detail.
dataset/ETHPy150Open GeekTrainer/Flask/Work/Trivia - Module 5/env/Lib/site-packages/pip/index.py/package_to_requirement--crossover with--dataset/ETHPy150Open openstack/taskflow/taskflow/persistence/models.py/TaskDetail.copy