관리-도구
편집 파일: depends.cpython-311.pyc
� ,�Re{ � � � d dl Z d dlZd dlZd dlZd dlmZ ddlmZmZm Z m Z ddlmZ g d�Z G d� d� � Z d � Zdd�Zdd�Zd � Z e� � dS )� N)�version� )�find_module�PY_COMPILED� PY_FROZEN� PY_SOURCE)�_imp)�Requirer �get_module_constant�extract_constantc �B � e Zd ZdZ dd�Zd� Zd� Zdd�Zd d �Zd d �Z dS )r z7A prerequisite to building or installing a distribution� Nc � � |�|�t j }|� ||� � }|�d}| j � t � � � � | `d S )N�__version__)r �Version�__dict__�update�locals�self)r �name�requested_version�module�homepage� attribute�formats ��/builddir/build/BUILDROOT/alt-python311-setuptools-65.6.3-2.el8.x86_64/opt/alt/python311/lib/python3.11/site-packages/setuptools/depends.py�__init__zRequire.__init__ s[ � � �>�/�;��_�F��� &��'8� 9� 9��� �)� �� ���V�X�X�&�&�&��I�I�I� c �@ � | j �| j �d| j ��S | j S )z0Return full package/distribution name, w/versionN�-)r r )r s r � full_namezRequire.full_name# s* � ��!�-�"�i�i�i��)?�)?�@�@��y�r c � � | j du p9| j du p0t |� � dk o| � |� � | j k S )z%Is 'version' sufficiently up-to-date?N�unknown)r r �strr )r r s r � version_okzRequire.version_ok) sN � ��~��%� Y����)<� Y���L�L�I�%�X�$�+�+�g�*>�*>�$�BX�*X� Yr r# c � � | j �C t | j |� � \ }}}|r|� � � |S # t $ r Y dS w xY wt | j | j ||� � }|� ||ur| j �| � |� � S |S )a� Get version number of installed module, 'None', or 'default' Search 'paths' for module. If not found, return 'None'. If found, return the extracted version attribute, or 'default' if no version attribute was specified, or the value cannot be determined without importing the module. The version is formatted according to the requirement's version format (if any), unless it is 'None' or the supplied 'default'. N)r r r �close�ImportErrorr r )r �paths�default�f�p�i�vs r �get_versionzRequire.get_version. s� � � �>�!� �%�d�k�5�9�9���1�a�� ��G�G�I�I�I����� � � ��t�t� ���� ���T�^�W�e�L�L���=�Q�g�-�-�$�+�2I��;�;�q�>�>�!��s �0: � A�Ac �0 � | � |� � duS )z/Return true if dependency is present on 'paths'N)r/ )r r) s r � is_presentzRequire.is_presentI s � �����&�&�d�2�2r c �x � | � |� � }|�dS | � t |� � � � S )z>Return true if dependency is present and up-to-date on 'paths'NF)r/ r% r$ )r r) r s r � is_currentzRequire.is_currentM s7 � ��"�"�5�)�)���?��5����s�7�|�|�,�,�,r )r NN)Nr# �N) �__name__� __module__�__qualname__�__doc__r r! r% r/ r1 r3 � r r r r s� � � � � � �A�A� =?�#'� � � � �� � �Y� Y� Y� � � � �63� 3� 3� 3�-� -� -� -� -� -r r c �l � t j d� � � }| s |� � S t j | � � S )Nc 3 � K � d V � d S r4 r9 r9 r r �emptyzmaybe_close.<locals>.emptyV s � � � � �����r )� contextlib�contextmanager�closing)r+ r<