관리-도구
편집 파일: unix.cpython-311.pyc
� �Re� � �� � d dl Z d dlZd dlmZ d dlmZ d dlmZ ddlm Z ej � d� � rd dl mZ nd e fd �Z G d� de � � Zd ed ee fd�ZdgZdS )� N)�ConfigParser)�Path)�Optional� )�PlatformDirsABC�linux)�getuid�returnc � � t d� � �)Nzshould only be used on Linux)�RuntimeError� � ��/builddir/build/BUILDROOT/alt-python311-pip-21.3.1-3.el8.x86_64/opt/alt/python311/lib/python3.11/site-packages/pip/_vendor/platformdirs/unix.pyr r s � ��9�:�:�:r c �f � e Zd ZdZedefd�� � Zedefd�� � Zdedefd�Zedefd�� � Z edefd�� � Z edefd �� � Zedefd �� � Zedefd�� � Z edefd�� � Zedefd �� � Zedefd�� � Zedefd�� � Zdedefd�ZdS )�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>`. r c �� � t j � dd� � }|� � � st j � d� � }| � |� � 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 sS � � �z�~�~�o�r�2�2���z�z�|�|� 8��7�%�%�&6�7�7�D��0�0��6�6�6r c � � t j � dd� � }|� � � sdt j � d�}| � |� � 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( sO � � �z�~�~�o�r�2�2���z�z�|�|� =�<�b�j�<�<�<�D��$�$�T�*�*�*r r c � � � |� t j � � }� j s |dd� }� fd�|D � � }t j � |� � S )Nr r c �t �� g | ]4}�� t j � |� � � � ��5S r )r r r r )�.0�pr s �r � <listcomp>z)Unix._with_multi_path.<locals>.<listcomp>9 s8 �� �a�a�a�RS�T�6�6�r�w�7I�7I�!�7L�7L�M�M�a�a�ar )�splitr r"