� ��^i�l����ddlZddlZddlZddlZddlZddlmZmZddlm Z m Z m Z ddl m Z ddlmZddlmZddlmZddlmZmZmZdd lmZmZdd lmZmZdd lmZdd l m!Z!dd l"m#Z#ddl$m%Z%m&Z&ddl'm(Z(ddl)m*Z*ddl+m,Z,ddl-m.Z.ddl/m0Z0ddl1m2Z2ddl3m4Z4ddl5m6Z6m7Z7m8Z8m9Z9ddl:m;Z;ddlZ>ddl?m@Z@mAZAmBZBe4eC��ZDde#de@fd�ZEGd�de��ZF d4d eGd!e eHd"e eHd#eGd$e eHde eHf d%�ZId"e eHd#eGdeGfd&�ZJ d5d'e eGd(e eHd)e eHd*e eHd+eGdeGf d,�ZKd-e e*d.e e eHddfd/�ZLd0eMd1eGd2eGdeHfd3�ZNdS)6�N)� SUPPRESS_HELP�Values)�Iterable�List�Optional)�canonicalize_name)� WheelCache)� cmdoptions)�make_target_python)�RequirementCommand�warn_if_run_as_root� with_cleanup)�ERROR�SUCCESS)� CommandError�InstallationError)� get_scheme)�get_environment)� FormatControl)�ConflictDetails�check_install_conflicts)�install_given_reqs)�InstallRequirement)�get_requirement_tracker)�WINDOWS)�parse_distutils_args��test_writable_dir)� getLogger)� ensure_dir�get_pip_version�(protect_pip_from_modification_on_windows� write_output)� TempDirectory)�running_under_virtualenv�virtualenv_no_global)�BinaryAllowedPredicate�build� should_build_for_install_command�format_control�returnc�0��dtdtf�fd� }|S)N�reqr+c�b��t|jpd��}��|��}d|vS)N��binary)r�name�get_allowed_formats)r-�canonical_name�allowed_formatsr*s ���/builddir/build/BUILDROOT/alt-python311-pip-21.3.1-4.el8.x86_64/opt/alt/python311/lib/python3.11/site-packages/pip/_internal/commands/install.py�check_binary_allowedz6get_check_binary_allowed..check_binary_allowed5s4���*�3�8�>�r�:�:��(�<�<�^�L�L���?�*�*�)r�bool)r*r6s` r5�get_check_binary_allowedr94s8���+�"4�+��+�+�+�+�+�+� �r7c��eZdZdZdZdd�Zededee de fd���Z d e d e d e ddfd �Zd eedeefd�Zdede ddfd�ZdS)�InstallCommandaI Install packages from: - PyPI (and other indexes) using requirement specifiers. - VCS project urls. - Local project directories. - Local or remote source archives. pip also supports installing from "requirements files", which provide an easy way to specify a whole environment to be installed. a% %prog [options] [package-index-options] ... %prog [options] -r [package-index-options] ... %prog [options] [-e] ... %prog [options] [-e] ... %prog [options] ...r+Nc�� �|j�tj����|j�tj����|j�tj����|j�tj����|j�tj����|j�dddddd���tj|j��|j�ddd d � ��|j�d dd t� ��|j�ddddd���|j�ddddd���|j�tj ����|j�dddd d� ��|j�dddddgd���|j�ddd d � ��|j�d!d"d#d d$� ��|j�tj ����|j�tj ����|j�tj ����|j�tj����|j�tj����|j�tj����|j�d%d d&d'd(�)��|j�d*d d&d+�,��|j�d-d d.d'd/�)��|j�d0d d1d'd2�)��|j�tj����|j�tj����|j�tj����|j�tj����|j�tj����tjtj|j��}|j�d3|��|j�d3|j��dS)4Nz-tz--target� target_dir�dirz�Install packages into . By default this will not replace existing files/folders in . Use --upgrade to replace existing packages in with new versions.)�dest�metavar�default�helpz--user� use_user_site� store_truez�Install to the Python user install directory for your platform. Typically ~/.local/, or %APPDATA%\Python on Windows. (See the Python documentation for site.USER_BASE for full details.))r?�actionrBz --no-user� store_falsez--root� root_pathz=Install everything relative to this alternate root directory.z--prefix� prefix_pathzIInstallation prefix where lib, bin and other top-level folders are placedz-Uz --upgrade�upgradez�Upgrade all specified packages to the newest available version. The handling of dependencies depends on the upgrade-strategy used.z--upgrade-strategy�upgrade_strategyzonly-if-needed�eageraGDetermines how dependency upgrading should be handled [default: %default]. "eager" - dependencies are upgraded regardless of whether the currently installed version satisfies the requirements of the upgraded package(s). "only-if-needed" - are upgraded only when they do not satisfy the requirements of the upgraded package(s).)r?rA�choicesrBz--force-reinstall�force_reinstallz;Reinstall all packages even if they are already up-to-date.z-Iz--ignore-installed�ignore_installedz�Ignore the installed packages, overwriting them. This can break your system if the existing package is of a different version or was installed with a different package manager!z --compile�compileTz'Compile Python source files to bytecode)rEr?rArBz --no-compilez.Do not compile Python source files to bytecode)rEr?rBz--no-warn-script-location�warn_script_locationz0Do not warn when installing scripts outside PATHz--no-warn-conflicts�warn_about_conflictsz%Do not warn about broken dependenciesr)�cmd_opts� add_optionr � requirements� constraints�no_deps�pre�editable�add_target_python_optionsr�src�ignore_requires_python�no_build_isolation� use_pep517� no_use_pep517�install_options�global_options� no_binary� only_binary� prefer_binary�require_hashes� progress_bar�make_option_group� index_group�parser�insert_option_group)�self� index_optss r5� add_optionszInstallCommand.add_optionsQs��� � � � ��!8�!:�!:�;�;�;� � � � ��!7�!9�!9�:�:�:� � � � ��!3�!5�!5�6�6�6� � � � ���!1�!1�2�2�2� � � � ��!4�!6�!6�7�7�7� � � � � � ����%� !� � � � �,�T�]�;�;�;� � � � � � ��%� !� � � � � � � � � � �� !� � � � � � � � ����P� !� � � � � � � � ����%� !� � � � � � � ���!1�!1�2�2�2� � � � � � ���)� !� � � � � � � � �#�$�%�w�/�G� !� � � � � � � � �"��N� !� � � � � � � � � �#��4� !� � � � � � � ��!B�!D�!D�E�E�E� � � � ��!>�!@�!@�A�A�A� � � � ��!6�!8�!8�9�9�9� � � � ��!9�!;�!;�<�<�<� � � � ��!;�!=�!=�>�>�>� � � � ��!:�!<�!<�=�=�=� � � � � ����:� !� � � � � � � � � ��A� !� � � � � � � � '� �'��C� !� � � � � � � � !� �'��8� !� � � � � � � ��!5�!7�!7�8�8�8� � � � ��!7�!9�!9�:�:�:� � � � ��!9�!;�!;�<�<�<� � � � ��!:�!<�!<�=�=�=� � � � ��!8�!:�!:�;�;�;��1� � "� �K� � � � � �'�'��:�6�6�6� � �'�'��4�=�9�9�9�9�9r7�options�argsc �� �)�|jr|j�td���tj|��d}|jr|j}tj|d���|jpg}t� dt����t|j|j |j|j|j���|_d}d}|jr�d|_t"j�|j��|_t"j�|j��r3t"j�|j��std���t-d� ��}|j}|�|��|jpg}|�|��}t5|��} |�||| |j� ��} t;|j|j��} |�tA����} t-|j! d d� ��} |�"||| |��}|D] }d|_#� tI||j��|�%| || || |j� ��}|�&|| || |j|j|j|j'||j(�� � }|�)| ��|�*||j ���} |�+d��}|j,du}n#tZ$rd}YnwxYwt]|���t_| j���)�)fd�|j0�1��D��}te|| dgg���\}}d�|D��}|r5tgd�4d�5|�������|D]}|j(sd|_6�|�7|��}d}|j8 o|j9}|r|�:|��}|j;}|js|j rd}ty||||j||j ||j|j=�� � }t}|j||j|j |j���}t|��} |�@t�jBd�����g}!|D]S}"|"jC}# | �D|#��}$|$� |#�d|$jE��}#n#t�$rYnwxYw|!�G|#���T|�*|�H||�I|�����d�5|!��}%|%rt�d |%��n[#t�$rN}&|jLd!k}'t�|&|'|j��}(t�N|(|'�"��t�cYd}&~&Sd}&~&wwxYw|jr%|sJ�|�P|j||j��t���t�S)#Nz'Can not combine '--user' and '--target'zto-satisfy-onlyT)� check_targetzUsing %s)rHr=rG� isolated_modez=Target path exists but is not a directory, will not continue.�target)�kind)rm�session� target_pythonr[�install)�deleters�globally_managed)�temp_build_dirrm� req_trackerrt�finderrC) �preparerr{rm� wheel_cacherCrNr[rMrJr])�check_supported_wheels�pipF)� modifying_pipc�4��g|]}t|����|��S�)r))�.0�rr6s �r5� z&InstallCommand.run..bs:�������3�A�7K�L�L�����r7)r}�verify� build_optionsr`c�*�g|]}|j� |j��Sr�)r]r1)r�r�s r5r�z&InstallCommand.run..rs1��5�5�5��!�,�5���5�5�5r7zYCould not build wheels for {}, which is required to install pyproject.toml-based projectsz, i� )�root�home�prefixrPrC� pycompile)�userr�r�r��isolatedr1)�key�-)�resolver_variant� zSuccessfully installed %s�)�exc_info)SrCr=rr �check_install_build_globalrIrJ�check_dist_restrictionr_�logger�verboser!�decide_user_installrHrGrqrN�os�path�abspath�exists�isdirr$� enter_contextr`�get_default_sessionr �_build_package_finderr[r � cache_dirr*r�no_clean�get_requirements�permit_editable_wheels�'reject_location_related_install_options�make_requirement_preparer� make_resolverrMr]�trace_basic_info�resolve�get_requirement� satisfied_by�KeyErrorr"r9rT�valuesr(r�format�join�legacy_install_reason�get_installation_order�ignore_dependenciesrQ�_determine_conflictsrPrrO�get_lib_location_guessesr�sort�operator� attrgetterr1�get_distribution�version� Exception�append�_warn_about_conflicts�determine_resolver_variantr#�OSError� verbosity�create_os_error_message�errorr�_handle_target_dirr r)*rjrmrnrJr_�target_temp_dir�target_temp_dir_pathr`rtrur{r}rz� directory�reqsr-r|�resolver�requirement_set�pip_reqr�� reqs_to_build�_�build_failures�pep517_build_failure_namesr�� to_install� conflicts�should_warn_about_conflictsrP� installed� lib_locations�env�items�result�item�installed_dist�installed_descr��show_traceback�messager6s* @r5�runzInstallCommand.run�s2��� � � J�W�%7�%C��H�I�I� I��-�g�6�6�6�,�� �?� 8�&�7� ��)�'��E�E�E�E�!�1�7�R�����z�?�#4�#4�5�5�5� 3� � !��+��)��'�!�/� ! �! �! ���48��.2�� � � 0�'+�G� $�!#�����1C�!D�!D�G� �����w�1�2�2� ��G�M�M�'�"4�5�5� � #�S���� ,��:�:�:�O�#2�#7� � � � �� /� /� /� �/�5�2���*�*�7�3�3��*�7�3�3� ��+�+���'�#*�#A� ,� � �� !��!2�G�4J�K�K� ��(�(�)@�)B�)B�C�C� �!��'�'��!� � � � � [ ��(�(��w���H�H�D� � 2� 2��-1��*�*� 3�D�'�:Q� R� R� R��5�5�(��'���%�3� 6���H��)�)�!���'�%�3�!(�!9�'.�'E� '� 7�!1�"�-�*� � �H� � !� !�&� )� )� )�&�.�.���1C�-C�/���O� =�)�9�9�%�@�@�� !(� 4�� <� � �� � &� &� &� %� � � � &���� 5�=� Q� Q� Q� Q�#;�F��>����M� !&��'�� �!� !�!�!� �A�~�5�5� .�5�5�5� &�*� �'�<��L� :� :� :��L�L�L�L�L�L����� ���� � � �"� "� "�?� � #� #��"�O�W�_� � � � �����sj�CU�K;�1 U�; L �U� L � F%U�0#S�U� S!�U� S!�!A,U� V&�AV!�V&�!V&r=r�rIc�� �t|��g}td|j���}|j}|j}|j}t j�|��r|�|��t j�|��r||kr|�|��t j�|��r|�|��|D�]y} t j | ��D�]`} | |krDt j� || ��� t� fd�|dd�D����r�Mt j� || ��} t j�| ��r�|st� d| ����t j�| ��rt� d| ����t j�| ��rt!j| ��nt j| ��t!jt j� | | ��| ����b��{dS)Nr/)r�c3�B�K�|]}|����V��dS�N)� startswith)r��s�ddirs �r5� z4InstallCommand._handle_target_dir..�s/�����I�I�!�1�<�<��-�-�I�I�I�I�I�Ir7�����zKTarget directory %s already exists. Specify --upgrade to force replacement.z�Target directory %s already exists and is a link. pip will not automatically replace links, please remove if replacement is desired.)r rr��purelib�platlib�datar�r�r��listdirr��anyr��warning�islinkr��shutil�rmtree�remove�move) rjr=r�rI� lib_dir_list�scheme� purelib_dir� platlib_dir�data_dir�lib_dirr��target_item_dirr�s @r5r�z!InstallCommand._handle_target_dir�sL��� �:����� ��B�_�%9�:�:�:���n� ��n� ��;�� �7�>�>�+� &� &� -� � � � � ,� ,� ,� �7�>�>�+� &� &� -�;�+�+E�+E� � � � � ,� ,� ,� �7�>�>�(� #� #� *� � � �� )� )� )�#� J� J�G�� �7�+�+� J� J���h�&�&��7�<�<��$�7�7�D��I�I�I�I�|�C�R�C�7H�I�I�I�I�I�!� �"$�'�,�,�z�4�"@�"@���7�>�>�/�2�2�3�"�!����>�+���� !��w�~�~�o�6�6�!����'�,� ���!��w�}�}�_�5�5�3�� �o�6�6�6�6�� �/�2�2�2�� �B�G�L�L��$�7�7��I�I�I�I�9 J� J� Jr7r�c�x� t|��S#t$rt�d��YdSwxYw)NzwError while checking for conflicts. Please file an issue on pip's issue tracker: https://github.com/pypa/pip/issues/new)rr�r�� exception)rjr�s r5r�z#InstallCommand._determine_conflicts sW�� �*�:�6�6� 6��� � � � � � �N� � � ��4�4�  ���s ��$9�9�conflict_detailsr�c �H�|\}\}}|s|sdSg}|dkr|�d��n|dksJ�|�d��|D]N}||d}||D]5} d�||| d���} |�| ���6�O|D]W}||d}||D]>\} } } d �||| | | |dkrd nd � ��} |�| ���?�Xt�d �|����dS)N�legacyz�pip's legacy dependency resolver does not consider dependency conflicts when selecting packages. This behaviour is the source of the following dependency conflicts.z 2020-resolverz�pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.rz@{name} {version} requires {requirement}, which is not installed.r�)r1r�� requirementzg{name} {version} requires {requirement}, but {you} have {dep_name} {dep_version} which is incompatible.�youzyou'll)r1r�r��dep_name� dep_versionr�� )r�r�r��criticalr�)rjr�r�� package_set�missing� conflicting�parts� project_namer�� dependencyr�r�r�r-s r5r�z$InstallCommand._warn_about_conflictss���/?�+� �+�g�{�� �{� � �F��� �x� '� '� �L�L�@� � � � � $��6�6�6�6� �L�L�@� � � �$� &� &�L�!�,�/��2�G�%�l�3� &� &� �.��&�%�#� *�1� ������ � �W�%�%�%�%� &�(� &� &�L�!�,�/��2�G�.9�,�.G� &� &�*��+�s�F��&�%�#� #�%� +�"2�o�"E�"E���8� ����� � �W�%�%�%�%� &� ���� � �%�(�(�)�)�)�)�)r7)r+N)�__name__� __module__� __qualname__�__doc__�usagerlrrr�str�intr�r$r8r�rrrr�r�r�r7r5r;r;=s������ � � 0�E�]:�]:�]:�]:�~�c�6�c��c��c�s�c�c�c��\�c�J4J��4J�0=�4J�HL�4J� �4J�4J�4J�4J�l ��1�2� � �/� "� � � � �4*� /�4*�CF�4*� �4*�4*�4*�4*�4*�4*r7r;Fr�r�r�r�r�c�H�td|||||���}|j|jgS)Nr/)r�r�r�r�r�)rr�r�)r�r�r�r�r�r�s r5r�r�Os;��� � � � ��� ���F� �N�F�N� +�+r7c �l�td�tt||�����D����S)Nc3�4K�|]}t|��V��dSr�r)r��ds r5r�z)site_packages_writable..bs>������ � �!��������r7�r�r�)�all�setr�rs r5�site_packages_writablerasF�� ����-�4�(�K�K�K�L�L���� � �r7rCrHr=rGrqc��|�|st�d��dS|rJ|rtd���t��rt d���t�d��dS|�J�|s|rt�d��dSt jst�d ��dSt||� ��rt�d ��dSt�d ��dS) aZDetermine whether to do a user install based on the input options. If use_user_site is False, no additional checks are done. If use_user_site is True, it is checked for compatibility with other options. If use_user_site is None, the default behaviour depends on the environment, which is provided by the other arguments. Nz$Non-user install by explicit requestFzVCan not combine '--user' and '--prefix' as they imply different installation locationszZCan not perform a '--user' install. User site-packages are not visible in this virtualenv.z User install by explicit requestTz3Non-user install due to --prefix or --target optionz4Non-user install because user site-packages disabledrz0Non-user install because site-packages writeablezMDefaulting to user installation because normal site-packages is not writeable) r��debugrr&r�site�ENABLE_USER_SITEr�info)rCrHr=rGrqs r5r�r�hs<��" �!�M�!�� � �;�<�<�<��u�� � � ��3��� � � !� !� �#�6��� � � � �7�8�8�8��t� � � � ���j��� � �J�K�K�K��u� � ��� � �K�L�L�L��u��9�}�E�E�E��� � �G�H�H�H��u� �K�K� ���� �4r7rTrmc �6�dttdttfd�}g}|D]^}|j}t |��}|rD|�d�||�����|�����_|rTt |��}|rC|�d�||���������|sdStd�d� |�������) z�If any location-changing --install-option arguments were passed for requirements or on the command-line, then show a deprecation warning. � option_namesr+c��d�|D��S)Nc�`�g|]+}d�|�dd������,S)z--{}r�r�)r��replace)r�r1s r5r�zSreject_location_related_install_options..format_options..�s2��O�O�O�$�� � �d�l�l�3��4�4�5�5�O�O�Or7r�)rs r5�format_optionsz?reject_location_related_install_options..format_options�s��O�O�,�O�O�O�Or7z {!r} from {}z{!r} from command lineNz�Location-changing options found in --install-option: {}. This is unsupported, use pip-level options like --user, --prefix, --root, and --target instead.z; ) rr rr_rr�r��keysrr�)rTrmr!� offendersr�r_�location_optionss r5r�r��sM��P�X�c�]�P�t�C�y�P�P�P�P��I�#��� �%�5��/��@�@�� � � � � ��%�%�"�N�#3�#8�#8�#:�#:�;�;�[��� � � �� ��/��8�8�� � � � � �(�/�/���?O�?T�?T�?V�?V�0W�0W�X�X� � � � ���� � 3�39�6�$�)�)�I�:N�:N�3O�3O� � �r7r�r��using_user_sitec���g}|�d��|s8|�d��|�t|����n|�d��|dxxdz cc<|jtjkrid}d}t ��s-|s+|�|d|���g��n|�|��|�d ��trI|jtjkr4|j r-t|j ��d kr|�d ��d � |��� ��dzS) zrFormat an error message for an OSError It may occur anytime during the execution of the install command. z,Could not install packages due to an OSErrorz: �.r�rz"Consider using the `--user` optionzCheck the permissionsz or z. iz�HINT: This error might have occurred since this system does not have Windows Long Path support enabled. You can find information on how to enable this at https://pip.pypa.io/warnings/enable-long-paths r/) r�r �errno�EACCESr%�extend�lowerr�ENOENT�filename�lenr��strip)r�r�r%r�user_option_part�permissions_parts r5r�r��s��� �E� �L�L�?�@�@�@� �� � � �T���� � � �S��Z�Z� � � � � � � �S���� �"�I�I�I���I�I�I� �{�e�l�"�"�?��2��'�)�)� +�/� +� �L�L�$��$�*�*�,�,�� � � � � �L�L�)� *� *� *� � � �U���� �  � �K�5�<� '� '� �N� (� ��� � �#� %� %� � � � ?� � � � �7�7�5�>�>� � � !� !�D� (�(r7)FNNFN)NNNF)Or(r�r�r�r�optparserr�typingrrr�pip._vendor.packaging.utilsr�pip._internal.cacher �pip._internal.clir �pip._internal.cli.cmdoptionsr �pip._internal.cli.req_commandr r r�pip._internal.cli.status_codesrr�pip._internal.exceptionsrr�pip._internal.locationsr�pip._internal.metadatar�#pip._internal.models.format_controlr�pip._internal.operations.checkrr�pip._internal.reqr�pip._internal.req.req_installr�pip._internal.req.req_trackerr�pip._internal.utils.compatr�"pip._internal.utils.distutils_argsr�pip._internal.utils.filesystemr�pip._internal.utils.loggingr�pip._internal.utils.miscr r!r"r#�pip._internal.utils.temp_dirr$�pip._internal.utils.virtualenvr%r&�pip._internal.wheel_builderr'r(r)rr�r9r;r8r r�rr�r�r�r�r�r7r5�rJs{�� � � � ����� � � � � � � � � � � � �*�*�*�*�*�*�*�*�+�+�+�+�+�+�+�+�+�+�9�9�9�9�9�9�*�*�*�*�*�*�(�(�(�(�(�(�;�;�;�;�;�;����������� :�9�9�9�9�9�9�9�D�D�D�D�D�D�D�D�.�.�.�.�.�.�2�2�2�2�2�2�=�=�=�=�=�=�S�S�S�S�S�S�S�S�0�0�0�0�0�0�<�<�<�<�<�<�A�A�A�A�A�A�.�.�.�.�.�.�C�C�C�C�C�C�<�<�<�<�<�<�1�1�1�1�1�1������������� 7�6�6�6�6�6������������������� ��8� � �� �]� �?U� � � � �O*�O*�O*�O*�O*�'�O*�O*�O*�f���� � ,�,� �,� �3�-�,� �3�-�,�� ,� �S�M� ,�  �#�Y� ,�,�,�,�$��#���$��4�����"&� $�#�� :�:��D�>�:��#��:��� �:���}� :� � :�  � :�:�:�:�z$��)�*�$�5=�d�3�i�5H�$� �$�$�$�$�N6)� �6)�$(�6)�;?�6)��6)�6)�6)�6)�6)�6)r7