diff --git a/pipenv/utils.py b/pipenv/utils.py index ca5f3d5b..60c12cbd 100644 --- a/pipenv/utils.py +++ b/pipenv/utils.py @@ -1281,6 +1281,7 @@ def fs_str(string): _fs_encoding = sys.getfilesystemencoding() or sys.getdefaultencoding() +# Duplicated from Pew to avoid importing it (performance considerations). def get_workon_home(): from ._compat import Path workon_home = os.environ.get('WORKON_HOME') @@ -1288,5 +1289,8 @@ def get_workon_home(): if os.name == 'nt': workon_home = '~/.virtualenvs' else: - workon_home = os.sep.join([os.environ.get('XDG_DATA_HOME', '~/.local/share'), 'virtualenvs']) + workon_home = os.path.join( + os.environ.get('XDG_DATA_HOME', '~/.local/share'), + 'virtualenvs', + ) return Path(os.path.expandvars(workon_home)).expanduser()