|KTtP J d Z dZd eee ZddlZddlZej d dk Z e reZ
ej d rRddlZ ej
d d Ze d rdZn"e d rd
Zn
dZnej Zd)d
Zd)dZd)dZd)dZd*dZd)dZd*dZ G d de Zd Zd Zd Zd Zedk r= ddlZeZn5# e $ r- ddl!m"Z" eZn # e $ r ddl#Z$eZn
# e $ r eZY nw xY wY nw xY wY nw xY we%dk rdZ&dZ'dZ( e)d ez e)d! ee&e'd"# Z*e(D ]Z+ e)e+d$ e,e*e+ e)d% ee&e' Z*e(D ]Z+ e)e+d$ e,e*e+ e)d& ee& Z*e(D ]Z+ e)e+d$ e,e*e+ e)d' ee&d( Z*e(D ]Z+ e)e+d$ e,e*e+ dS dS )+zyUtilities for determining application-specific dirs.
See for details and usage.
) . Nr javaWindowswin32Macdarwinlinux2Fc t dk r|| }|rdpd}t j t | }| rF|dur"t j ||| }nt j || }nt dk rBt j d }| r t j || }nTt j dt j d }| r t j || }| r"|r t j || }|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 s /builddir/build/BUILDROOT/alt-python311-setuptools-65.6.3-2.el9.x86_64/opt/alt/python311/lib/python3.11/site-packages/pkg_resources/_vendor/appdirs.py
user_data_dirr - s1 @ I+OD/Dw 6 677 3%%w||D)W==w||D'22 8 w!!"BCC /7<<g..Dy"'*<*<=M*N*NOO /7<<g..D +7 +w||D'**K c l t dk r{| }t j t d } rG|dur#t j || }n*t j | }nt dk rBt j d } r t j | }nt j dt j dd g }d
| t j D } r0|r t j | fd|D }|r t j | }n|d }|S r"|r t j || }|S )
ai Return full path to the user-shared 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.
"multipath" is an optional parameter only applicable to *nix
which indicates that the entire list of data dirs should be
returned. By default, the first item from XDG_DATA_DIRS is
returned, or '/usr/local/share/',
if XDG_DATA_DIRS is not set
Typical site data directories are:
Mac OS X: /Library/Application Support/
Unix: /usr/local/share/ or /usr/share/
Win XP: C:\Documents and Settings\All Users\Application Data\\
Vista: (Fail! "C:\ProgramData" is a hidden *system* directory on Vista.)
Win 7: C:\ProgramData\\ # Hidden, but writeable on Win 7.
For Unix, this is using the $XDG_DATA_DIRS[0] default.
WARNING: Do not use this on Windows. See the Vista-Fail note above for why.
r NCSIDL_COMMON_APPDATAFr z/Library/Application Support
XDG_DATA_DIRSz/usr/local/sharez
/usr/sharec g | ]>}t j | t j ?S r r r rstripsep.0xs r
z!site_data_dir..