관리-도구
편집 파일: install.cpython-311.pyc
� �Re�l � �� � d dl Z d dlZd dlZd dlZd dlZd dlmZmZ d dlm Z m Z mZ d dlm Z d dlmZ d dlmZ d dlmZ d dlmZmZmZ d d lmZmZ d d lmZmZ d dlmZ d dl m!Z! d d l"m#Z# d dl$m%Z%m&Z& d dl'm(Z( d dl)m*Z* d dl+m,Z, d dl-m.Z. d dl/m0Z0 d dl1m2Z2 d dl3m4Z4 d dl5m6Z6m7Z7m8Z8m9Z9 d dl:m;Z; d dl<m=Z=m>Z> d dl?m@Z@mAZAmBZB e4eC� � ZDde#de@fd�ZE G d� de� � ZF d4d eGd!eeH d"eeH d#eGd$eeH de eH fd%�ZId"eeH d#eGdeGfd&�ZJ d5d'eeG d(eeH d)eeH d*eeH d+eGdeGfd,�ZKd-e e* d.ee eH ddfd/�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 � � dt dt f� fd�}|S )N�reqr+ c �b �� t | j pd� � }�� |� � }d|v S )N� �binary)r �name�get_allowed_formats)r- �canonical_name�allowed_formatsr* s ���/builddir/build/BUILDROOT/alt-python311-pip-21.3.1-3.el8.x86_64/opt/alt/python311/lib/python3.11/site-packages/pip/_internal/commands/install.py�check_binary_allowedz6get_check_binary_allowed.<locals>.check_binary_allowed5 s4 �� �*�3�8�>�r�:�:��(�<�<�^�L�L���?�*�*� )r �bool)r* r6 s ` r5 �get_check_binary_allowedr9 4 s8 �� �+�"4� +�� +� +� +� +� +� +� �r7 c � � e Zd ZdZdZdd�Zededee de fd�� � Zd e d ede ddfd�Zd ee dee fd�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] <requirement specifier> [package-index-options] ... %prog [options] -r <requirements file> [package-index-options] ... %prog [options] [-e] <vcs project url> ... %prog [options] [-e] <local project path> ... %prog [options] <archive url/path> ...r+ Nc �� � | j � t j � � � � | j � t j � � � � | j � t j � � � � | j � t j � � � � | j � t j � � � � | j � ddddd d�� � t j | j � � | j � ddd d �� � | j � ddd t �� � | j � dddd d�� � | j � dddd d�� � | j � t j � � � � | j � dddd d�� � | j � dddddgd�� � | j � ddd d �� � | j � d!d"d#d d$�� � | j � t j � � � � | j � t j � � � � | j � t j � � � � | j � t j � � � � | j � t j � � � � | j � t j � � � � | j � d%d d&d'd(�)� � | j � d*d d&d+�,� � | j � d-d d.d'd/�)� � | j � d0d d1d'd2�)� � | j � t j � � � � | j � t j � � � � | j � t j � � � � | j � t j � � � � | j � t j � � � � t j t j | j � � }| j � d3|� � | j � d3| j � � d S )4Nz-tz--target� target_dir�dirz�Install packages into <dir>. By default this will not replace existing files/folders in <dir>. Use --upgrade to replace existing packages in <dir> 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? �actionrB z --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�eageraG Determines 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 �choicesrB z--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)rE r? rA rB z--no-compilez.Do not compile Python source files to bytecode)rE r? rB z--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_optionsQ s� � �� � � ��!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 �� �)� |j r|j �t d� � �t j |� � d}|j r|j }t j |d�� � |j pg }t � dt � � � � t |j |j |j |j |j �� � |_ d }d }|j r�d|_ t"