capybara/virtualenv/lib/python2.7/site-packages/pip/_vendor/_markerlib/markers.py
def compile(marker):
    """Return compiled marker as a function accepting an environment dict."""
    try:
        return _cache[marker]
    except KeyError:
        pass
    if not marker.strip():
        def marker_fn(environment=None, override=None):
            """"""
            return True
    else:
        compiled_marker = compile_marker(parse_marker(marker))
        def marker_fn(environment=None, override=None):
            """override updates environment"""
            if override is None:
                override = {}
            if environment is None:
                environment = default_environment()
            environment.update(override)
            return eval(compiled_marker, environment)
    marker_fn.__doc__ = marker
    _cache[marker] = marker_fn
    return _cache[marker]
def compile(marker):
    """Return compiled marker as a function accepting an environment dict."""
    try:
        return _cache[marker]
    except KeyError:
        pass
    if not marker.strip():
        def marker_fn(environment=None, override=None):
            """"""
            return True
    else:
        compiled_marker = compile_marker(parse_marker(marker))
        def marker_fn(environment=None, override=None):
            """override updates environment"""
            if override is None:
                override = {}
            if environment is None:
                environment = default_environment()
            environment.update(override)
            return eval(compiled_marker, environment)
    marker_fn.__doc__ = marker
    _cache[marker] = marker_fn
    return _cache[marker]
def compile ( marker ) : try : return _cache [ marker ] except KeyError : pass if not marker . strip ( ) : def marker_fn ( environment = None , override = None ) : """""" return True else : compiled_marker = compile_marker ( parse_marker ( marker ) ) def marker_fn ( environment = None , override = None ) : """override updates environment""" if override is None : override = { } if environment is None : environment = default_environment ( ) environment . update ( override ) return eval ( compiled_marker , environment ) marker_fn . __doc__ = marker _cache [ marker ] = marker_fn return _cache [ marker ]
Return compiled marker as a function accepting an environment dict.
Return compiled marker as a function accepting an environment dict .