a
lj @ s| d Z ddlZddlZddlmZ ddlmZ eedddZ dee
ed d
dZdee
ed dd
Zeee dddZ
dS )z
This code wraps the vendored appdirs module to so the return values are
compatible for the current pip code base.
The intention is to rewrite current usages gradually, keeping the tests pass,
and eventually drop this after all usages are changed.
N)List)platformdirs)appnamereturnc C s t j| ddS )NF) appauthor)_appdirsuser_cache_dir)r r ?/usr/lib/python3.9/site-packages/pip/_internal/utils/appdirs.pyr s r T)r roamingr c C sB t j| d|d}tj|r |S d}| r6tj|| }tj|S )NFr r z
~/.config/)r Z
user_data_dirospathisdirjoin
expanduser)r r r Zlinux_like_pathr r r
_macos_user_config_dir s r c C s$ t jdkrt| |S tj| d|dS )NdarwinFr )sysplatformr r user_config_dir)r r r r r
r " s
r c C sN t jdkrtj| dddgS tj| ddd}t jdkr<|gS |tjdg S )Nr FT)r Z multipathwin32z/etc)r r r Z
site_data_dirZsite_config_dirsplitr
pathsep)r Zdirvalr r r
site_config_dirs+ s
r )T)T)__doc__r
r typingr Zpip._vendorr r strr boolr r r r r r r