'Evaluate a PEP 426 environment marker using markerlib.
Return a boolean indicating the marker result in this environment.
Raise SyntaxError if marker is invalid.'

@classmethod
def _markerlib_evaluate(cls, text):

    from pip._vendor import _markerlib
    env = _markerlib.default_environment()
    for key in env.keys():
        new_key = key.replace('.', '_')
        env[new_key] = env.pop(key)
    try:
        result = _markerlib.interpret(text, env)
    except NameError:
        e = sys.exc_info()[1]
        raise SyntaxError(e.args[0])
    return result
