How to use the requirementslib.Requirement.from_metadata function in requirementslib

To help you get started, we’ve selected a few requirementslib examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github sarugaku / passa / src / passa / internals / candidates.py View on Github external
def _requirement_from_metadata(name, version, extras, index):
    # Markers are intentionally dropped here. They will be added to candidates
    # after resolution, so we can perform marker aggregation.
    r = requirementslib.Requirement.from_metadata(name, version, extras, None)
    r.index = index
    return r
github pypa / pipenv / pipenv / vendor / passa / internals / candidates.py View on Github external
def _requirement_from_metadata(name, version, extras, index):
    # Markers are intentionally dropped here. They will be added to candidates
    # after resolution, so we can perform marker aggregation.
    r = requirementslib.Requirement.from_metadata(name, version, extras, None)
    r.index = index
    return r