o
Xai}` @ sz d Z dZdeeeZddlZddlZejd dkZ e reZ
ejdrDddlZe
d d Zedr9dZned rAd
ZndZnejZd4d
dZd4ddZd4ddZd4ddZd5ddZd4ddZd5ddZG dd deZdd Zd d! Zd"d# Zd$d% ZedkrzddlZeZW n1 e y z
dd&l!m"Z" eZW n e y zddl#Z$eZW n e y eZY nw Y nw Y nw e%d'kr9d(Z&d)Z'd*Z(e)d+e e)d, ee&e'd-d.Z*e(D ]
Z+e)d/e+e,e*e+f qe)d0 ee&e'Z*e(D ]
Z+e)d/e+e,e*e+f qe)d1 ee&Z*e(D ]Z+e)d/e+e,e*e+f qe)d2 ee&dd3Z*e(D ]Z+e)d/e+e,e*e+f q*dS dS )6zyUtilities for determining application-specific dirs.
See for details and usage.
) . Nr javaWindowswin32ZMacdarwinZlinux2Fc C s t dkr/|du r
| }|rdpd}tjt|}| r.|dur'tj||| }n/tj|| }n't dkrCtjd}| rBtj|| }ntdtjd }| rVtj|| }| ra|ratj||}|S )
aJ Return full path to the user-specific data dir for this application.
"appname" is the name of application.
If None, just the system directory is returned.
"appauthor" (only used on Windows) is the name of the
appauthor or distributing body for this application. Typically
it is the owning company name. This falls back to appname. You may
pass False to disable it.
"version" is an optional version path element to append to the
path. You might want to use this if you want multiple versions
of your app to be able to run independently. If used, this
would typically be ".".
Only applied when appname is present.
"roaming" (boolean, default False) can be set True to use the Windows
roaming appdata directory. That means that for users on a Windows
network setup for roaming profiles, this user data will be
sync'd on login. See
for a discussion of issues.
Typical user data directories are:
Mac OS X: ~/Library/Application Support/
Unix: ~/.local/share/ # or in $XDG_DATA_HOME, if defined
Win XP (not roaming): C:\Documents and Settings\\Application Data\\
Win XP (roaming): C:\Documents and Settings\\Local Settings\Application Data\\
Win 7 (not roaming): C:\Users\\AppData\Local\\
Win 7 (roaming): C:\Users\\AppData\Roaming\\
For Unix, we follow the XDG spec and support $XDG_DATA_HOME.
That means, by default "~/.local/share/".
r N
CSIDL_APPDATACSIDL_LOCAL_APPDATAFr z~/Library/Application Support/
XDG_DATA_HOMEz~/.local/sharesystemospathnormpath_get_win_folderjoin
expandusergetenv)appname appauthorversionroamingconstr r /builddir/build/BUILDROOT/alt-python310-setuptools-58.3.0-4.el8.x86_64/opt/alt/python310/lib/python3.10/site-packages/pkg_resources/_vendor/appdirs.py
user_data_dir- s* r c s
t dkr)|du r
}tjtd} r(|dur!tj|| }nWtj| }nOt dkr=tjd} r