U
ʗRe @ s d dl mZ d dlZd dlZd dlmZ d dlmZ ddlm Z ej
drZd dlmZ nd d
ddZG d
d de Z
dddddZdgZdS ) )annotationsN)ConfigParser)Path )PlatformDirsABClinux)getuidintreturnc C s t dd S )Nzshould only be used on Linux)RuntimeError r
r
/builddir/build/BUILDROOT/alt-python38-pip-22.2.1-2.el8.x86_64/opt/alt/python38/lib/python3.8/site-packages/pip/_vendor/platformdirs/unix.pyr s r c @ s e Zd ZdZeddddZeddddZdddd d
ZeddddZeddd
dZ eddddZ
eddddZeddddZeddddZ
eddddZeddddZeddddZddddd Zd!S )"UnixaD
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 `.
strr
c C s, t jdd}| s"t jd}| |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 r
r
r
user_data_dir s zUnix.user_data_dirc C s. t jdd}| s$dt j d}| |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 r
r
r
site_data_dir) s zUnix.site_data_dir)r r c s<