3 ReE @ s^ d Z ddlmZ ddlZddlmZ ddlmZ er@ddl m Z dd Zdd dZdd Z 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. )absolute_importN)appdirs)MYPY_CHECK_RUNNING)Listc C s t j| ddS )NF) appauthor)_appdirsuser_cache_dir)appname r /builddir/build/BUILDROOT/alt-python36-pip-20.2.4-5.el9.x86_64/opt/alt/python36/lib/python3.6/site-packages/pip/_internal/utils/appdirs.pyr s r Tc C sJ t j| d|d}t jdkrFtjj| rFtjjd}| rFtjj|| }|S )NF)r roamingdarwinz ~/.config/)r user_config_dirsystemospathisdir expanduserjoin)r r r r r r r s r c C s2 t j| ddd}t jdkr,|jtjdg S |gS )NFT)r multipathwin32r z/etc)r r )r site_config_dirr splitr pathsep)r dirvalr r r site_config_dirs&