code: def dependency_to_rpm(dep, runtime):
      
      logger.debug('Dependencies provided: {0} runtime: {1}.'.format(
          dep, runtime))
      converted = []
      if not len(dep.specs):
          converted.append(['Requires', dep.project_name])
      else:
          for ver_spec in dep.specs:
              if ver_spec[0] == '!=':
                  converted.append(
                      ['Conflicts', dep.project_name, '=', ver_spec[1]])
              elif ver_spec[0] == '==':
                  converted.append(
                      ['Requires', dep.project_name, '=', ver_spec[1]])
              else:
                  converted.append(
                      ['Requires', dep.project_name, ver_spec[0], ver_spec[1]])
  
      if not runtime:
          for conv in converted:
              conv[0] = "Build" + conv[0]
      logger.debug('Converted dependencies: {0}.'.format(converted))
  
      return converted
docs: Converts a dependency got by pkg_resources.Requirement.parse()
      to RPM format.
      Args:
          dep - a dependency retrieved by pkg_resources.Requirement.parse()
          runtime - whether the returned dependency should be runtime (True)
          or build time (False)
      Returns:
          List of semi-SPECFILE dependencies (package names are not properly
          converted yet).
          For example: [['Requires', 'jinja2'],
                        ['Conflicts', 'jinja2', '=', '2.0.1']]