我们从Python开源项目中,提取了以下40个代码示例,用于说明如何使用pip.locations.build_prefix()。
def __init__(self, *args, **kw): super(BundleCommand, self).__init__(*args, **kw) # bundle uses different default source and build dirs build_opt = self.parser.get_option("--build") build_opt.default = backup_dir(build_prefix, '-bundle') src_opt = self.parser.get_option("--src") src_opt.default = backup_dir(src_prefix, '-bundle') self.parser.set_defaults(**{ src_opt.dest: src_opt.default, build_opt.dest: build_opt.default, })
def _pip_has_created_build_dir(self): return (self.build_dir == build_prefix and os.path.exists(os.path.join(self.build_dir, PIP_DELETE_MARKER_FILENAME)))