hyb
2025-11-10 e0a856b5072c5a09f3f6de6da85abf90e00ee704
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
Ë
Añúh“)ãó¸—dZddlmZddlZddlZddlmZddlmZddl    m
Z
m Z ddl m Z ejd    k(rdd
„Zndd lmZGd „d e «Zdd„Zdd„Zd gZy)zUnix.é)Ú annotationsN)Ú ConfigParser)ÚPath)ÚIteratorÚNoReturné)ÚPlatformDirsABCÚwin32có—d}t|«‚)Nzshould only be used on Unix)Ú RuntimeError)Úmsgs úWH:\Change_password\venv_build\Lib\site-packages\setuptools/_vendor/platformdirs/unix.pyÚgetuidrs€Ø+ˆÜ˜3ÓÐó)rcó¢—eZdZdZedd„«Zedd„«Zedd„«Zedd„«Zedd„«Z    edd„«Z
edd„«Z edd    „«Z edd
„«Z edd „«Zedd „«Zedd „«Zedd„«Zedd„«Zedd„«Zedd„«Zedd„«Zedd„«Zedd„«Zedd„«Zedd„«Zdd„Zdd„Zdd„Zy) ÚUnixa†
    On Unix/Linux, we follow the `XDG Basedir Spec <https://specifications.freedesktop.org/basedir-spec/basedir-spec-
    latest.html>`_.
 
    The spec allows overriding directories with environment variables. The examples shown are the default values,
    alongside the name of the environment variable that overrides them. Makes use of the `appname
    <platformdirs.api.PlatformDirsABC.appname>`, `version <platformdirs.api.PlatformDirsABC.version>`, `multipath
    <platformdirs.api.PlatformDirsABC.multipath>`, `opinion <platformdirs.api.PlatformDirsABC.opinion>`, `ensure_exists
    <platformdirs.api.PlatformDirsABC.ensure_exists>`.
 
    có—tjjdd«}|j«stjj d«}|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©ÚosÚenvironÚgetÚstripÚpathÚ
expanduserÚ_append_app_name_and_version©Úselfrs  rÚ user_data_dirzUnix.user_data_dir$sG€ô z‰z~‰~˜o¨rÓ2ˆØz‰zŒ|Ü—7‘7×%Ñ%Ð&6Ó7ˆDØ×0Ñ0°Ó6Ð6rcó —tjjdd«}|j«sdtj›d}|j tj«Dcgc]}|j |«‘Œc}Scc}w)NÚ XDG_DATA_DIRSrz/usr/local/sharez
/usr/share)rrrrÚpathsepÚsplitr©rrÚps   rÚ_site_data_dirszUnix._site_data_dirs/s]€äz‰z~‰~˜o¨rÓ2ˆØz‰zŒ|Ø%¤b§j¡j \°Ð<ˆDØ>B¿j¹jÌÏÉÓ>TÖU¸×1Ñ1°!Õ4ÒUÐUùÒUsÁ&Bcóz—|j}|js|dStjj    |«S)aZ
        :return: data directories shared by users (if `multipath <platformdirs.api.PlatformDirsABC.multipath>` is
         enabled and ``XDG_DATA_DIRS`` 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``
        r)r'Ú    multipathrr#Újoin©rÚdirss  rÚ site_data_dirzUnix.site_data_dir6s2€ð×#Ñ#ˆØ~Š~ؘ‘7ˆN܏z‰z‰˜tÓ$Ð$rcó—tjjdd«}|j«stjj d«}|j |«S)z•
        :return: config directory tied to the user, e.g. ``~/.config/$appname/$version`` or
         ``$XDG_CONFIG_HOME/$appname/$version``
        ÚXDG_CONFIG_HOMErz    ~/.configrrs  rÚuser_config_dirzUnix.user_config_dirCsG€ô z‰z~‰~Ð/°Ó4ˆØz‰zŒ|Ü—7‘7×%Ñ% kÓ2ˆDØ×0Ñ0°Ó6Ð6rcóè—tjjdd«}|j«sd}|j    tj
«Dcgc]}|j |«‘Œc}Scc}w)NÚXDG_CONFIG_DIRSrz/etc/xdg)rrrrr$r#rr%s   rÚ_site_config_dirszUnix._site_config_dirsNsQ€äz‰z~‰~Ð/°Ó4ˆØz‰zŒ|؈DØ>B¿j¹jÌÏÉÓ>TÖU¸×1Ñ1°!Õ4ÒUÐUùÒUsÁA/cóz—|j}|js|dStjj    |«S)a2
        :return: config directories shared by users (if `multipath <platformdirs.api.PlatformDirsABC.multipath>`
         is enabled and ``XDG_CONFIG_DIRS`` 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``
        r)r3r)rr#r*r+s  rÚsite_config_dirzUnix.site_config_dirUs2€ð×%Ñ%ˆØ~Š~ؘ‘7ˆN܏z‰z‰˜tÓ$Ð$rcó—tjjdd«}|j«stjj d«}|j |«S)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_dirzUnix.user_cache_dirbsG€ô z‰z~‰~Ð.°Ó3ˆØz‰zŒ|Ü—7‘7×%Ñ% jÓ1ˆDØ×0Ñ0°Ó6Ð6rcó$—|jd«S)zO:return: cache directory shared by users, e.g. ``/var/cache/$appname/$version``z
/var/cache)r©rs rÚsite_cache_dirzUnix.site_cache_dirms€ð×0Ñ0°Ó>Ð>rcó—tjjdd«}|j«stjj d«}|j |«S)z˜
        :return: state directory tied to the user, e.g. ``~/.local/state/$appname/$version`` or
         ``$XDG_STATE_HOME/$appname/$version``
        ÚXDG_STATE_HOMErz~/.local/staterrs  rÚuser_state_dirzUnix.user_state_dirrsH€ô z‰z~‰~Ð.°Ó3ˆØz‰zŒ|Ü—7‘7×%Ñ%Ð&6Ó7ˆDØ×0Ñ0°Ó6Ð6rcó˜—|j}|jr1tjj    |d«}|j |«|S)zg:return: log directory tied to the user, same as `user_state_dir` if not opinionated else ``log`` in itÚlog)r>Úopinionrrr*Ú_optionally_create_directoryrs  rÚ user_log_dirzUnix.user_log_dir}s=€ð×"Ñ"ˆØ <Š<Ü—7‘7—<‘<  eÓ,ˆDØ × -Ñ -¨dÔ 3؈ rcó—tdd«S)zC:return: documents directory tied to the user, e.g. ``~/Documents``ÚXDG_DOCUMENTS_DIRz ~/Documents©Ú_get_user_media_dirr:s rÚuser_documents_dirzUnix.user_documents_dir†s€ô#Ð#6¸ ÓFÐFrcó—tdd«S)zC:return: downloads directory tied to the user, e.g. ``~/Downloads``ÚXDG_DOWNLOAD_DIRz ~/DownloadsrFr:s rÚuser_downloads_dirzUnix.user_downloads_dir‹s€ô#Ð#5°}ÓEÐErcó—tdd«S)zA:return: pictures directory tied to the user, e.g. ``~/Pictures``ÚXDG_PICTURES_DIRz
~/PicturesrFr:s rÚuser_pictures_dirzUnix.user_pictures_dirs€ô#Ð#5°|ÓDÐDrcó—tdd«S)z=:return: videos directory tied to the user, e.g. ``~/Videos``ÚXDG_VIDEOS_DIRz~/VideosrFr:s rÚuser_videos_dirzUnix.user_videos_dir•s€ô#Ð#3°ZÓ@Ð@rcó—tdd«S)z;:return: music directory tied to the user, e.g. ``~/Music``Ú XDG_MUSIC_DIRz~/MusicrFr:s rÚuser_music_dirzUnix.user_music_diršs€ô# ?°IÓ>Ð>rcó—tdd«S)z?:return: desktop directory tied to the user, e.g. ``~/Desktop``ÚXDG_DESKTOP_DIRz    ~/DesktoprFr:s rÚuser_desktop_dirzUnix.user_desktop_dirŸs€ô#Ð#4°kÓBÐBrcóD—tjjdd«}|j«s`tj
j d«r4dt«›}t|«j«sdt«›}n dt«›}|j|«S)az
        :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©ÚfreebsdÚopenbsdÚnetbsdz/var/run/user/z /tmp/runtime-z
/run/user/) rrrrÚsysÚplatformÚ
startswithrrÚexistsrrs  rÚuser_runtime_dirzUnix.user_runtime_dir¤s€€ôz‰z~‰~Ð/°Ó4ˆØz‰zŒ|܏|‰|×&Ñ&Ð'GÔHØ'¬« zÐ2Ü˜D“z×(Ñ(Ô*Ø*¬6«8¨*Ð5‘Dà#¤F£H :Ð.Ø×0Ñ0°Ó6Ð6rcó̗tjjdd«}|j«s$tj
j d«rd}nd}|j|«S)am
        :return: runtime directory shared by users, e.g. ``/run/$appname/$version`` or         ``$XDG_RUNTIME_DIR/$appname/$version``.
 
        Note that this behaves almost exactly like `user_runtime_dir` if ``$XDG_RUNTIME_DIR`` is set, but will
        fall back to paths associated to the root user instead of a regular logged-in user if it's not set.
 
        If you wish to ensure that a logged-in root user path is returned e.g. ``/run/user/0``, use `user_runtime_dir`
        instead.
 
        For FreeBSD/OpenBSD/NetBSD, it would return ``/var/run/$appname/$version`` if ``$XDG_RUNTIME_DIR`` is not set.
        rYrrZz/var/runz/run)rrrrr^r_r`rrs  rÚsite_runtime_dirzUnix.site_runtime_dir¸sP€ôz‰z~‰~Ð/°Ó4ˆØz‰zŒ|܏|‰|×&Ñ&Ð'GÔHØ!‘àØ×0Ñ0°Ó6Ð6rcó8—|j|j«S)zh:return: data path shared by users. Only return the first item, even if ``multipath`` is set to ``True``)Ú _first_item_as_path_if_multipathr-r:s rÚsite_data_pathzUnix.site_data_pathÎs€ð×4Ñ4°T×5GÑ5GÓHÐHrcó8—|j|j«S)zj:return: config path shared by the users, returns the first item, even if ``multipath`` is set to ``True``)rfr5r:s rÚsite_config_pathzUnix.site_config_pathÓs€ð×4Ñ4°T×5IÑ5IÓJÐJrcó8—|j|j«S)zi:return: cache path shared by users. Only return the first item, even if ``multipath`` is set to ``True``)rfr;r:s rÚsite_cache_pathzUnix.site_cache_pathØs€ð×4Ñ4°T×5HÑ5HÓIÐIrcót—|jr"|jtj«d}t    |«S)Nr)r)r$rr#r)rÚ    directorys  rrfz%Unix._first_item_as_path_if_multipathÝs*€Ø >Š>à!Ÿ™¬¯
©
Ó3°AÑ6ˆIܐI‹Ðrc#óTK—|j–—|jEd{–—†y7Œ­w)z4:yield: all user and site configuration directories.N)r0r3r:s rÚiter_config_dirszUnix.iter_config_dirsãs!èø€à×"Ñ"Ò"Ø×)Ñ)×)Ò)úó ‚( &¡(c#óTK—|j–—|jEd{–—†y7Œ­w)z+:yield: all user and site data directories.N)r r'r:s rÚiter_data_dirszUnix.iter_data_dirsès!èø€à× Ñ Ò Ø×'Ñ'×'Ò'úrpN)ÚreturnÚstr)rsz    list[str])rsr)rmrtrsr)rsz Iterator[str])Ú__name__Ú
__module__Ú __qualname__Ú__doc__Úpropertyr r'r-r0r3r5r8r;r>rCrHrKrNrQrTrWrbrdrgrirkrfrorr©rrrrs΄ñ
ðò7óð7ðòVóðVð ò
%óð
%ðò7óð7ðòVóðVð ò
%óð
%ðò7óð7ðò?óð?ðò7óð7ðòóððòGóðGðòFóðFðòEóðEðòAóðAðò?óð?ðòCóðCðò7óð7ð&ò7óð7ð*òIóðIðòKóðKðòJóðJóó *ô
(rrcó¾—t|«}|€Otjj|d«j    «}|stj
j |«}|S)Nr)Ú_get_user_dirs_folderrrrrrr)Úenv_varÚfallback_tilde_pathÚ    media_dirs   rrGrGîsM€Ü% gÓ.€IØÐÜ—J‘J—N‘N 7¨BÓ/×5Ñ5Ó7ˆ    ÙÜŸ™×*Ñ*Ð+>Ó?ˆIà Ðrcó¢—tt«j«dz }|j«r“t    «}|j «5}|j d|j«›«ddd«||dvry|d|jd«}|jdtjjd««Sy#1swYŒXxYw)z{
    Return directory from user-dirs.dirs config file.
 
    See https://freedesktop.org/wiki/Software/xdg-user-dirs/.
 
    zuser-dirs.dirsz[top]
NÚtopú"z$HOMEú~) rrr0rarÚopenÚ read_stringÚreadrÚreplacerrr)ÚkeyÚuser_dirs_config_pathÚparserÚstreamrs     rr|r|øs»€ô!¤£×!7Ñ!7Ó8Ð;KÑKÐØ×#Ñ#Ô%Ü“ˆà "× 'Ñ 'Ó )ð    :¨Và × Ñ  ¨¯©«¨Ð8Ô 9÷    :ð f˜U‘mÑ #Øàe‰}˜SÑ!×'Ñ'¨Ó,ˆà|‰|˜G¤R§W¡W×%7Ñ%7¸Ó%<Ó=Ð=à ÷    :ð    :ús Á #CÃC)rsr)r}rtr~rtrsrt)rˆrtrsz
str | None)rxÚ
__future__rrr^Ú configparserrÚpathlibrÚtypingrrÚapir    r_rrrGr|Ú__all__rzrrú<module>r’sXðÙ å"ã    Û
Ý%Ýß%å à‡<<7Òô õ
ôT(ˆ?ôT(ónóð4 ð r