capybara/virtualenv/lib/python2.7/site.py
def check_enableusersite():
    """Check if user site directory is safe for inclusion

    The function tests for the command line flag (including environment var),
    process uid/gid equal to effective uid/gid.

    None: Disabled for security reasons
    False: Disabled by user (command line option)
    True: Safe and enabled
    """
    if hasattr(sys, 'flags') and getattr(sys.flags, 'no_user_site', False):
        return False

    if hasattr(os, "getuid") and hasattr(os, "geteuid"):
        # check process uid == effective uid
        if os.geteuid() != os.getuid():
            return None
    if hasattr(os, "getgid") and hasattr(os, "getegid"):
        # check process gid == effective gid
        if os.getegid() != os.getgid():
            return None

    return True
def check_enableusersite():
    if hasattr(sys, 'flags') and getattr(sys.flags, 'no_user_site', False):
        return False

    if hasattr(os, "getuid") and hasattr(os, "geteuid"):
        # check process uid == effective uid
        if os.geteuid() != os.getuid():
            return None
    if hasattr(os, "getgid") and hasattr(os, "getegid"):
        # check process gid == effective gid
        if os.getegid() != os.getgid():
            return None

    return True
def check_enableusersite ( ) : if hasattr ( sys , 'flags' ) and getattr ( sys . flags , 'no_user_site' , False ) : return False if hasattr ( os , "getuid" ) and hasattr ( os , "geteuid" ) : # check process uid == effective uid if os . geteuid ( ) != os . getuid ( ) : return None if hasattr ( os , "getgid" ) and hasattr ( os , "getegid" ) : # check process gid == effective gid if os . getegid ( ) != os . getgid ( ) : return None return True
Check if user site directory is safe for inclusion

    The function tests for the command line flag (including environment var),
    process uid/gid equal to effective uid/gid.

    None: Disabled for security reasons
    False: Disabled by user (command line option)
    True: Safe and enabled
Check if user site directory is safe for inclusion