R`ii" d Z ddlmZ ddlZddlZddlmZ ddlmZ ddl m
Z
ej dk( rdd Zndd
lmZ G d de
Z
dd
ZddZdgZy)zUnix. )annotationsN)ConfigParser)Path )PlatformDirsABCwin32c d} t | )Nzshould only be used on Unix)RuntimeError)msgs /builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/platformdirs/unix.pygetuidr
s +3 )r
c R e Zd ZdZedd Zedd ZddZedd Zedd Z edd Z
edd Zedd Zedd
Z
edd Zedd Zedd
Zedd Zedd Zedd Zedd Zedd Zedd ZddZy)Unixa
On Unix/Linux, we follow the
`XDG Basedir Spec `_. The spec allows
overriding directories with environment variables. The examples show are the default values, alongside the name of
the environment variable that overrides them. Makes use of the
`appname `,
`version `,
`multipath `,
`opinion `,
`ensure_exists `.
c t j j dd }|j st j j d }| j
| S )z
:return: data directory tied to the user, e.g. ``~/.local/share/$appname/$version`` or
``$XDG_DATA_HOME/$appname/$version``
XDG_DATA_HOME z~/.local/shareosenvirongetstrippath
expanduser_append_app_name_and_versionselfr s r
user_data_dirzUnix.user_data_dir" sG zz~~or2zz|77%%&67D0066r c t j j dd }|j sdt j d}| j | S )aY
:return: data directories shared by users (if `multipath ` is
enabled and ``XDG_DATA_DIR`` is set and a multi path the response is also a multi path separated by the OS
path separator), e.g. ``/usr/local/share/$appname/$version`` or ``/usr/share/$appname/$version``
XDG_DATA_DIRSr z/usr/local/sharez
/usr/share)r r r r pathsep_with_multi_pathr s r
site_data_dirzUnix.site_data_dir- sD zz~~or2zz|%bjj\