/usr/local/lib/python3.6/site-packages/platformdirs/__pycache__
Edit: /usr/local/lib/python3.6/site-packages/platformdirs/__pycache__/unix.cpython-36.pyc (7054B)
3
0Dg @ s d dl Z d dlZd dlmZ d dlmZ d dlmZ ddlm Z ej
jdrZd dl mZ ne
d d
dZG dd
d
e Zeee dddZd
gZdS ) N)ConfigParser)Path)Optional )PlatformDirsABClinux)getuid)returnc C s t dd S )Nzshould only be used on Linux)RuntimeError r r ;/usr/local/lib/python3.6/site-packages/platformdirs/unix.pyr
s r c @ s e Zd ZdZeedddZeedddZeeddd Zeedd
dZ eeddd
Z
eedddZeedddZeedddZ
eedddZeedddZeedddZeedddZeedddZdS ) 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 `.
)r c C s, t jjdd}|j s"t jjd}| 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/share)osenvirongetstrippath
expanduser_append_app_name_and_version)selfr r r r
user_data_dir s zUnix.user_data_dirc C s. t jjdd}|j s$dt 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_path)r r r r r
site_data_dir( s zUnix.site_data_dir)r r c s<