文件操作 - _cache.cpython-311.pyc
返回文件管理
返回主菜单
删除本文件
文件: /usr/lib/python3/dist-packages/stevedore/__pycache__/_cache.cpython-311.pyc
编辑文件内容
� ��Oc� � � � d Z ddlZddlZddlZddlmZ ddlZddlZddl Z ddl Z ddlZ ddlZddl Z e j d� � Zd� Zd� Zd� Zd� Zd� Z G d � d � � Z e� � Zej Zej Zej ZdS )z3Use a cache layer in front of entry point scanning.� Nzstevedore._cachec � � t j dk rot j dk r_t j � dd� � pt j � d� � } t j � | d� � S t j dk rt j � d� � S t j � dd� � pt j � d � � } t j � | d � � S )zpLocate a platform-appropriate cache directory to use. Does not ensure that the cache directory exists. �posix�darwin�XDG_CACHE_HOMENz~/.cachezpython-entrypointsz$~/Library/Caches/Python Entry Points�LOCALAPPDATAz~\AppData\LocalzPython Entry Points) �os�name�sys�platform�environ�get�path� expanduser�join)� base_paths �2/usr/lib/python3/dist-packages/stevedore/_cache.py�_get_cache_dirr s� � � �w�'���c�l�h�6�6��J�N�N�#3�T�:�:� .��w�!�!�*�-�-� ��w�|�|�I�';�<�<�<� ��� !� !��w�!�!�"H�I�I�I� �J�N�N�>�4�8�8� 7��w�!�!�"5�6�6� ��w�|�|�I�'<�=�=�=� c � � t j | � � }|j S # t $ r }|j t j k r� Y d }~nd }~ww xY wdS )Ng �)r �stat�st_mtime�OSError�errno�ENOENT)r �s�errs r � _get_mtimer 6 se � ���G�D�M�M���z���� � � ��9���$�$�� %�$�$�$�$��������� �4s � � A�A�Ac �P � t j d� � � | � � S )N�f)�struct�Struct�pack)r s r � _ftobytesr# @ s � ��=����"�"�1�%�%�%r c �� � g }t j � � }|� t j � d� � � � |� t j � d� � � � | D �]]}t |� � }|� |� d� � � � |� t |� � � � |� ||f� � t j t j t j � |dd� � � � t j t j � |dd� � � � � � D ]r}t |� � }|� |� d� � � � |� t |� � � � |� ||f� � �s��_|� � � |fS )z4Return a hash and the path settings that created it.zutf-8z*.dist-infozentry_points.txtz *.egg-info)�hashlib�sha256�updater � executable�encode�prefixr r# �append� itertools�chain�glob�iglobr r r � hexdigest)r �paths�h�entry�mtime�ep_files r �_hash_settings_for_pathr6 D s� � ��E�����A� �H�H�S�^� "� "�7� +� +�,�,�,��H�H�S�Z� � �w� '� '�(�(�(�� +� +���5�!�!�� ������g�&�&�'�'�'� ����5�!�!�"�"�"� ���e�U�^�$�$�$� ��� �2�7�<�<��(5�(:�<� <� =� =� � �2�7�<�<��(4�(:�<� <� =� =� � � +� +�G� �w�'�'�E� �H�H�W�^�^�G�,�,�-�-�-� �H�H�Y�u�%�%�&�&�&��L�L�'�5�)�*�*�*�*� +� �K�K�M�M�5�!�!r c � �� t j � � �t �t � � s�fd��j D � � �i } �� � � D ]b\ }}t � � }g }|| |<