관리-도구
편집 파일: unix.cpython-312.pyc
� t��e� � � � d dl mZ d dlZd dlZd dlmZ d dlmZ ddlm Z ej j d� rd dlmZ nd d �Z G d � de � Z dd�ZdgZy)� )�annotationsN)�ConfigParser)�Path� )�PlatformDirsABC�linux)�getuidc � � t d� �)Nzshould only be used on Linux)�RuntimeError� � ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-1.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pkg_resources/_vendor/platformdirs/unix.pyr r s � ��9�:�:r c �� � e Zd ZdZedd�� Zedd�� Zdd�Zedd�� Zedd�� Z edd�� Z edd�� Zedd �� Zedd �� Z edd�� Zedd�� Zedd �� Zdd�Zy)�UnixaD 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 show 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>`. c �� � t j j dd� }|j � st j j 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��selfr s r � user_data_dirzUnix.user_data_dir sG � � �z�z�~�~�o�r�2���z�z�|��7�7�%�%�&6�7�D��0�0��6�6r c � � t j j dd� }|j � sdt j � d�}| j |� S )aY :return: data directories shared by users (if `multipath <platformdirs.api.PlatformDirsABC.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_pathr s r � site_data_dirzUnix.site_data_dir) sD � � �z�z�~�~�o�r�2���z�z�|�%�b�j�j�\��<�D��$�$�T�*�*r c � � |j t j � }| j s|dd }|D �cg c]0 }| j t j j |� � ��2 }}t j j |� S c c}w )Nr r )�splitr r! � multipathr r r �join)r r � path_list�ps r r"