当前位置: 首页>>代码示例>>Python>>正文


Python compat.uses_pycache方法代码示例

本文整理汇总了Python中pip.compat.uses_pycache方法的典型用法代码示例。如果您正苦于以下问题:Python compat.uses_pycache方法的具体用法?Python compat.uses_pycache怎么用?Python compat.uses_pycache使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在pip.compat的用法示例。


在下文中一共展示了compat.uses_pycache方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: add

# 需要导入模块: from pip import compat [as 别名]
# 或者: from pip.compat import uses_pycache [as 别名]
def add(self, path):
        head, tail = os.path.split(path)

        # we normalize the head to resolve parent directory symlinks, but not
        # the tail, since we only want to uninstall symlinks, not their targets
        path = os.path.join(normalize_path(head), os.path.normcase(tail))

        if not os.path.exists(path):
            return
        if self._permitted(path):
            self.paths.add(path)
        else:
            self._refuse.add(path)

        # __pycache__ files can show up after 'installed-files.txt' is created,
        # due to imports
        if os.path.splitext(path)[1] == '.py' and uses_pycache:
            self.add(cache_from_source(path)) 
开发者ID:Frank-qlu,项目名称:recruit,代码行数:20,代码来源:req_uninstall.py

示例2: add

# 需要导入模块: from pip import compat [as 别名]
# 或者: from pip.compat import uses_pycache [as 别名]
def add(self, path):
        path = normalize_path(path, resolve_symlinks=False)
        if not os.path.exists(path):
            return
        if self._permitted(path):
            self.paths.add(path)
        else:
            self._refuse.add(path)

        # __pycache__ files can show up after 'installed-files.txt' is created,
        # due to imports
        if os.path.splitext(path)[1] == '.py' and uses_pycache:
            self.add(cache_from_source(path)) 
开发者ID:chalasr,项目名称:Flask-P2P,代码行数:15,代码来源:req_uninstall.py

示例3: add

# 需要导入模块: from pip import compat [as 别名]
# 或者: from pip.compat import uses_pycache [as 别名]
def add(self, path):
        path = normalize_path(path, resolve_symlinks=False)
        if not os.path.exists(path):
            return
        if self._permitted(path):
            self.paths.add(path)
        else:
            self._refuse.add(path)

        # __pycache__ files can show up after 'installed-files.txt' is created,
        # due to imports
        if os.path.splitext(path)[1] == '.py' and uses_pycache:
            self.add(imp.cache_from_source(path)) 
开发者ID:francelabs,项目名称:datafari,代码行数:15,代码来源:req_uninstall.py


注:本文中的pip.compat.uses_pycache方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。