o
ai @ s d Z ddlZddlZddlmZ ddlmZ dedefddZ dded
e
defddZdded
e
defd
dZdedee fddZ
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)platformdirsappnamereturnc C s t j| ddS )NF) appauthor)_appdirsuser_cache_dir)r r /builddir/build/BUILDROOT/alt-python310-pip-21.3.1-5.el8.x86_64/opt/alt/python310/lib/python3.10/site-packages/pip/_internal/utils/appdirs.pyr s r Troamingc C sB t j| d|d}tj|r|S d}| rtj|| }tj|S )NFr r z
~/.config/)r
user_data_dirospathisdirjoin
expanduser)r r r linux_like_pathr r r
_macos_user_config_dir s r c C s$ t jdkr
t| |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 multipathwin32z/etc)r r r
site_data_dirsite_config_dirsplitr pathsep)r dirvalr r r
site_config_dirs+ s
r )T)__doc__r r typingr pip._vendorr r strr boolr r r r r r r