� ��^i����ddlZddlmZddlmZmZmZmZmZddl m Z ddl m Z ddl mZddlmZddlmZeje��ZGd �d ��ZdS) �N)� OrderedDict)�Dict�Iterable�List�Optional�Tuple)�canonicalize_name)�InstallationError)�Wheel)�InstallRequirement)�compatibility_tagsc � �eZdZddeddfd�Zdefd�Zdefd�Zdeddfd �Z deddfd �Z dded e ed e e ede eee effd �Zdedefd�Zdedefd�Zedeefd���ZdS)�RequirementSetT�check_supported_wheels�returnNc�H�t��|_||_g|_dS)zCreate a RequirementSet.N)r� requirementsr�unnamed_requirements)�selfrs ��/builddir/build/BUILDROOT/alt-python311-pip-21.3.1-4.el8.x86_64/opt/alt/python311/lib/python3.11/site-packages/pip/_internal/req/req_set.py�__init__zRequirementSet.__init__s'��@��!�!�!�c��td�|j���D��d����}d�d�|D����S)Nc3�(K�|] }|j� |V��dS�N)� comes_from��.0�reqs r� z)RequirementSet.__str__..s)���� M� M�S�c�n� M�S� M� M� M� M� M� Mrc�.�t|jpd��S�N��r �name�rs r�z(RequirementSet.__str__..���-�c�h�n�"�=�=�r��key� c3�>K�|]}t|j��V��dSr��strrrs rr z)RequirementSet.__str__..s*����=�=���C�G� � �=�=�=�=�=�=r)�sortedr�values�join)rrs r�__str__zRequirementSet.__str__s_��� M� M�D�-�4�4�6�6� M� M� M�=�=� � � � ��x�x�=�=� �=�=�=�=�=�=rc���t|j���d����}d}|�|jjt |��d�d�|D�������S)Nc�.�t|jpd��Sr"r$r&s rr'z)RequirementSet.__repr__.."r(rr)z4<{classname} object; {count} requirement(s): {reqs}>z, c3�>K�|]}t|j��V��dSrr-rs rr z*RequirementSet.__repr__..)s*����@�@�C�3�s�w�<�<�@�@�@�@�@�@r)� classname�count�reqs)r/rr0�format� __class__�__name__�lenr1)rr� format_strings r�__repr__zRequirementSet.__repr__s���� � � $� $� &� &�=�=� � � � � O� ��#�#��n�-��l�#�#����@�@�<�@�@�@�@�@�$� � � r� install_reqc�L�|jrJ�|j�|��dSr)r%r�append)rr?s r�add_unnamed_requirementz&RequirementSet.add_unnamed_requirement,s.���#�#�#�#� �!�(�(��5�5�5�5�5rc�T�|jsJ�t|j��}||j|<dSr)r%r r)rr?� project_names r�add_named_requirementz$RequirementSet.add_named_requirement0s4�������(��)9�:�:� �*5���,�'�'�'r�parent_req_name�extras_requestedc�0�|�|��s*t�d|j|j��gdfS|jr{|jjrot|jj��}tj ��}|j r<|� |��s'td�|j�����|jr |� Jd���|js|�|��|gdfS |�|j��}n#t$$rd}YnwxYw|duoA|o?|j o7|j|jko'|jo |jo|jj|jjk}|r)td�|||j�����|s|�|��|g|fS|js|jsg|fS|jo!|jo|jj|jjk }|r'td�|j�����d|_|jrd|_t3t5t7|j��t7|j��z����|_t�d ||j��|g|fS) a&Add install_req as a requirement to install. :param parent_req_name: The name of the requirement that needed this added. The name is used because when multiple unnamed requirements resolve to the same name, we could otherwise end up with dependency links that point outside the Requirements set. parent_req must already be added. Note that None implies that this is a user supplied requirement, vs an inferred one. :param extras_requested: an iterable of extras used to evaluate the environment markers. :return: Additional requirements to scan. That is either [] if the requirement is not applicable, or [install_req] if the requirement is applicable and has just been added. z6Ignoring %s: markers '%s' don't match your environmentNz-{} is not a supported wheel on this platform.z+a user supplied req shouldn't have a parentz7Double requirement given: {} (already in {}, name={!r})zhCould not satisfy constraints for '{}': installation from path or url cannot be constrained to a versionFTzSetting %s extras to: %s)� match_markers�logger�infor%�markers�link�is_wheelr �filenamer � get_supportedr� supportedr r9� user_suppliedrB�get_requirement�KeyError� constraint�extrasr� specifierrE�path�tupler/�set�debug) rr?rFrG�wheel�tags� existing_req�has_conflicting_requirement�does_not_satisfy_constraints r�add_requirementzRequirementSet.add_requirement6sL��*�(�(�)9�:�:� � �K�K�H�� ��#� � � � �t�8�O� � � � � 0� 9� ��+�*�3�4�4�E�%�3�5�5�D��*� �5�?�?�4�3H�3H� �'�C�J�J���������)� 9�-<�-D�-D� 8�.E�-D� D� �� '� � (� (�� 5� 5� 5��=�$�&� &� �9=�9M�9M�� �:�:�L�L��� � � ��L�L�L� ���� �t� #� H�� H� �+�+� H��#�{�'9�9� H�� �  H� ��  H� � �*�k�o�.G�G� $� '� �#�I�P�P���{�/?����� �� .� � &� &�{� 3� 3� 3��=�+�-� -� � !� $��)@� $��|�#� #�&1�&6�' � � � Q�+�"2�"7�<�;L�;Q�"Q�< �#� '� �#�+�+1�6�+�2B�+C�+C��� �#(� �� � $� .�)-�L� &�#� �3�|�*�+�+�c�+�2D�.E�.E�E� F� F� � � �� � � � &� � � � � � ��~�|�+�+s�7D� D!� D!r%c�X�t|��}||jvo|j|j Sr)r rrU�rr%rDs r�has_requirementzRequirementSet.has_requirement�s7��(��.�.� � �D�-� -� ?��%�l�3�>�>� rc�p�t|��}||jvr |j|Std|�����)NzNo project with the name )r rrTrcs rrSzRequirementSet.get_requirement�sB��(��.�.� � �4�,� ,� ,��$�\�2� 2��;�4�;�;�<�<�r rBrErrrrrardrS�propertyrh�rrrrs�������A�A�t�A�t�A�A�A�A�>��>�>�>�>�  �#�  �  �  �  �6�3E�6�$�6�6�6�6�6�1C�6��6�6�6�6�*.�48� s,�s,�'�s,�"�#��s,�#�8�C�=�1� s,� �t�&�'��2D�)E�E� F� s,�s,�s,�s,�j �C� �D� � � � �=�C�=�,>�=�=�=�=��L�$�'9�":�L�L�L��X�L�L�Lrr)�logging� collectionsr�typingrrrrr�pip._vendor.packaging.utilsr �pip._internal.exceptionsr �pip._internal.models.wheelr �pip._internal.req.req_installr �pip._internal.utilsr � getLoggerr;rJrrmrr�rws�������#�#�#�#�#�#�8�8�8�8�8�8�8�8�8�8�8�8�8�8�9�9�9�9�9�9�6�6�6�6�6�6�,�,�,�,�,�,�<�<�<�<�<�<�2�2�2�2�2�2� �� �8� $� $��nL�nL�nL�nL�nL�nL�nL�nL�nL�nLr