mitsuhiko/pipsi

Symlinked home directories prevents pipsi list from working

Ouverte

#147 ouverte le 24 mai 2018

 (0 commentaire) (0 réaction) (0 personne assignée)Python (135 forks)github user discovery
enhancementhelp wanted

Métriques du dépôt

Stars
 (1 994 étoiles)
Métriques de merge PR
 (Aucune PR mergée en 30 j)

Description

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

Guide contributeur