def is_installable_file(path):
    'Determine if a path can potentially be installed'
    from .vendor.pip9.utils import is_installable_dir
    from .vendor.pip9.utils.packaging import specifiers
    if (hasattr(path, 'keys') and any((key for key in path.keys() if (key in ['file', 'path'])))):
        path = (urlparse(path['file']).path if ('file' in path) else path['path'])
    if ((not isinstance(path, six.string_types)) or (path == '*')):
        return False
    if any((path.startswith(spec) for spec in '!=<>~')):
        try:
            specifiers.SpecifierSet(path)
        except specifiers.InvalidSpecifier:
            pass
        else:
            return False
    if (not os.path.exists(os.path.abspath(path))):
        return False
    lookup_path = Path(path)
    absolute_path = '{0}'.format(lookup_path.absolute())
    if (lookup_path.is_dir() and is_installable_dir(absolute_path)):
        return True
    elif (lookup_path.is_file() and is_archive_file(absolute_path)):
        return True
    return False
Determine if a path can potentially be installed
def is_installable_file(path):
    
    from .vendor.pip9.utils import is_installable_dir
    from .vendor.pip9.utils.packaging import specifiers
    if (hasattr(path, 'keys') and any((key for key in path.keys() if (key in ['file', 'path'])))):
        path = (urlparse(path['file']).path if ('file' in path) else path['path'])
    if ((not isinstance(path, six.string_types)) or (path == '*')):
        return False
    if any((path.startswith(spec) for spec in '!=<>~')):
        try:
            specifiers.SpecifierSet(path)
        except specifiers.InvalidSpecifier:
            pass
        else:
            return False
    if (not os.path.exists(os.path.abspath(path))):
        return False
    lookup_path = Path(path)
    absolute_path = '{0}'.format(lookup_path.absolute())
    if (lookup_path.is_dir() and is_installable_dir(absolute_path)):
        return True
    elif (lookup_path.is_file() and is_archive_file(absolute_path)):
        return True
    return False