2bii"SrSSKJr SSKrSSKrSSKJr SSKJr SSK J r \RS:XaSS jr OSS KJ r "S S \ 5r SS jrSSjrS /rg)zUnix.) annotationsN) ConfigParser)Path)PlatformDirsABCwin32cSn[U5e)Nzshould only be used on Unix) RuntimeError)msgs ڏ/builddir/build/BUILDROOT/alt-python313-pip-23.3.1-3.el8.x86_64/opt/alt/python313/lib/python3.13/site-packages/pip/_vendor/platformdirs/unix.pygetuidr s+3)r c\rSrSrSr\SSj5r\SSj5rSSjr\SSj5r \SSj5r \SSj5r \SS j5r \SS j5r \SS j5r\SS j5r\SS j5r\SSj5r\SSj5r\SSj5r\SSj5r\SSj5r\SSj5r\SSj5rSSjrSrg)Unixab 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[RRSS5nUR5(d[RR S5nUR U5$)z~ :return: data directory tied to the user, e.g. ``~/.local/share/$appname/$version`` or ``$XDG_DATA_HOME/$appname/$version`` XDG_DATA_HOMEz~/.local/shareosenvirongetstrippath expanduser_append_app_name_and_versionselfrs r user_data_dirUnix.user_data_dir"sI zz~~or2zz||77%%&67D0066rc[RRSS5nUR5(dS[RS3nUR U5$)a9 :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_DIRSrz/usr/local/sharez /usr/share)rrrrpathsep_with_multi_pathrs r site_data_dirUnix.site_data_dir-sFzz~~or2zz||%bjj\` 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. ``/etc/xdg/$appname/$version`` XDG_CONFIG_DIRSrz/etc/xdg)rrrrr$rs r site_config_dirUnix.site_config_dirLs:zz~~/4zz||D$$T**rc[RRSS5nUR5(d[RR S5nUR U5$)z| :return: cache directory tied to the user, e.g. ``~/.cache/$appname/$version`` or ``~/$XDG_CACHE_HOME/$appname/$version`` XDG_CACHE_HOMErz~/.cacherrs r user_cache_dirUnix.user_cache_dirYsI zz~~.3zz||77%%j1D0066rc$URS5$)zM:return: cache directory shared by users, e.g. ``/var/tmp/$appname/$version``z/var/tmp)rrs r site_cache_dirUnix.site_cache_dirds00<>rcb[RRSS5nUR5(dj[R R S5(a9S[53n[U5R5(d S[53nO S[53nURU5$)aJ :return: runtime directory tied to the user, e.g. ``/run/user/$(id -u)/$appname/$version`` or ``$XDG_RUNTIME_DIR/$appname/$version``. For FreeBSD/OpenBSD/NetBSD, it would return ``/var/run/user/$(id -u)/$appname/$version`` if exists, otherwise ``/tmp/runtime-$(id -u)/$appname/$version``, if``$XDG_RUNTIME_DIR`` is not set. XDG_RUNTIME_DIRr)freebsdopenbsdnetbsdz/var/run/user/z /tmp/runtime-z /run/user/) rrrrsysplatform startswithr rexistsrrs r user_runtime_dirUnix.user_runtime_dirszz~~/4zz||||&&'GHH'z2Dz((***68*5D#FH:.0066rc8URUR5$)zd:return: data path shared by users. Only return first item, even if ``multipath`` is set to ``True``) _first_item_as_path_if_multipathr%r;s r site_data_pathUnix.site_data_paths44T5G5GHHrc8URUR5$)zj:return: config path shared by the users. Only return first item, even if ``multipath`` is set to ``True``)rir4r;s r site_config_pathUnix.site_config_paths44T5I5IJJrc8URUR5$)ze:return: cache path shared by users. Only return first item, even if ``multipath`` is set to ``True``)rir<r;s r site_cache_pathUnix.site_cache_paths44T5H5HIIrc~UR(a"UR[R5Sn[ U5$)Nr)r)r(rr#r)r directorys r ri%Unix._first_item_as_path_if_multipaths* >>! 3A6IIrN)returnstr)rrwrvrw)rvr)rsrwrvr)__name__ __module__ __qualname____firstlineno____doc__propertyrr%r$r0r4r8r<r@rErKrOrSrWr[rfrjrmrpri__static_attributes__rurr rrss 77 + +*77 + +77==77GGFFEEAA??77&IIKKJJrrc[U5nUcT[RRUS5R 5nU(d[R R U5nU$)Nr)_get_user_dirs_folderrrrrrr)env_varfallback_tilde_path media_dirs r rJrJsM%g.IJJNN7B/557 **+>?I rc[[5R5S- nUR5(a[ 5nUR 5nUR SUR535 SSS5 XS;agUSURS5nURS[RRS55$g!,(df  N^=f)zkReturn directory from user-dirs.dirs config file. See https://freedesktop.org/wiki/Software/xdg-user-dirs/.zuser-dirs.dirsz[top] Ntop"z$HOME~) rrr0reropen read_stringreadrreplacerrr)keyuser_dirs_config_pathparserstreamrs r rrs !7!78;KK##%% " ' ' )V   8 9* Um #e}S!'',||GRWW%7%7%<== * )s #C  C)rvint)rrwrrwrvrw)rrwrvz str | None)r| __future__rrrb configparserrpathlibrapirrcr rrJr__all__rurr rsU " % <<7 g?gT*  r