mitsuhiko/pipsi

Symlinked home directories prevents pipsi list from working

开放

#147 创建于 2018年5月24日

 (0 条评论) (0 个反应) (0 位负责人)Python (135 个派生)github user discovery
enhancementhelp wanted

仓库指标

星标
 (1,994 个星标)
PR 合并指标
 (30 天内没有已合并 PR)

描述

On FreeBSD its common for /home/{name} to be symlinked to /usr/home/{name}. Without this adjustment, the paths never match the target path provided in args. The following code in list_everything, found in pipsi.py (python 2), fixes the issue.

def _find_venv(target): # Fix for base_prefix being a symlink to the real directory. # (eg: /home/<name>/ -> /usr/home/<name>/) for venv in venvs: base_prefix = join(self.home, venv, "") real_prefix = os.path.realpath(base_prefix) if target.startswith(real_prefix): return venv

贡献者指南