관리-도구
편집 파일: easy_install.cpython-38.pyc
U ���e�N � @ s� d Z ddlmZ ddlmZ ddlmZmZ ddlmZmZm Z m Z ddlmZm Z ddlmZmZ ddlmZ dd lmZ dd lZdd lZdd lZdd lZdd lZdd lZdd lZdd lZdd lZdd lZdd lZdd l Z dd l!Z!dd l"Z"dd l#Z#dd l$Z$dd l%Z%dd l&Z&ddl'm(Z(m)Z) ddl*m+Z+ dd l*m,Z, ddl-m.Z. ddl/m0Z0 ddl1m2Z2 ddl3m4Z4m5Z5m6Z6 ddl/m7Z7m8Z8 ddl9m:Z: ddl;m<Z<m=Z=m>Z>m?Z?m@Z@mAZAmBZBmCZCmDZDmEZEmFZFmGZGmHZHmIZImJZJ dd l;Z;ejKde;jLd� dddddgZMdd� ZNdd� ZOdd � ZPd!d"� ZQd#d$� ZRG d%d� de,�ZSd&d'� ZTd(d)� ZUd*d+� ZVd,d� ZWd-d� ZXG d.d� deB�ZYG d/d0� d0eY�ZZej[�\d1d2�d3k�r�eZZYd4d5� Z]d6d7� Z^d8d9� Z_d:d;� Z`dhd<d=�Zad>d?� Zbd@dA� ZcdBejdk�r�ecZendCdD� ZedidFdG�ZfdHdI� ZgdJdK� ZhdLdM� ZizddNlmjZk W n elk �r. dOdP� ZkY nX dQdR� ZjG dSdT� dTem�Znen�o� ZpG dUdV� dVen�ZqG dWdX� dX�ZrG dYdZ� dZer�ZsG d[d\� d\es�ZterjuZuerjvZvd]d^� Zwd_d`� Zxdae^fdbdc�Zyddde� ZzG dfdg� dge+�Z{d S )ja0 Easy Install ------------ A tool for doing automatic download/extract/build of distutils-based Python packages. For detailed documentation, see the accompanying EasyInstall.txt file, or visit the `EasyInstall home page`__. __ https://setuptools.readthedocs.io/en/latest/deprecated/easy_install.html � )�glob)�get_platform)�convert_path� subst_vars)�DistutilsArgError�DistutilsOptionError�DistutilsError�DistutilsPlatformError)�INSTALL_SCHEMES�SCHEME_KEYS)�log�dir_util)� first_line_re)�find_executableN)�get_config_vars�get_path)�SetuptoolsDeprecationWarning)�Command)� run_setup)�setopt)�unpack_archive)�PackageIndex�parse_requirement_arg� URL_SCHEME)� bdist_egg�egg_info)�Wheel)�yield_lines�normalize_path�resource_string�ensure_directory�get_distribution�find_distributions�Environment�Requirement�Distribution�PathMetadata�EggMetadata� WorkingSet�DistributionNotFound�VersionConflict�DEVELOP_DIST�default)�category�samefile�easy_install�PthDistributions�extract_wininst_cfg�get_exe_prefixesc C s t �d�dkS )N�P� )�struct�calcsize� r7 r7 �M/opt/hc_python/lib/python3.8/site-packages/setuptools/command/easy_install.py�is_64bitJ s r9 c C sj t j�| �ot j�|�}tt jd�o&|}|r:t j�| |�S t j�t j�| ��}t j�t j�|��}||kS )z� Determine if two paths reference the same file. Augments os.path.samefile to work on Windows and suppresses errors if the path doesn't exist. r. )�os�path�exists�hasattrr. �normpath�normcase)�p1�p2Z both_existZuse_samefileZnorm_p1Znorm_p2r7 r7 r8 r. N s c C s | � d�S )N�utf8)�encode��sr7 r7 r8 � _to_bytes^ s rF c C s, z| � d� W dS tk r& Y dS X d S )N�asciiTF)rC �UnicodeErrorrD r7 r7 r8 �isasciib s rI c C s t �| ��� �dd�S )N� z; )�textwrap�dedent�strip�replace)�textr7 r7 r8 � _one_linerj s rP c @ s� e Zd ZdZdZdZdddddd d ddd ddddddddddddddej fgZddddd d!d"d#d$dg Z d%diZ eZd&d'� Z d(d)� Zd*d+� Zed,d-� �Zd.d/� Zd0d1� Zd2d3� Zd4d5� Zd6d7� Zd�d8d9�Zd:d;� Zd<d=� Zd>d?� Ze�d@��� Ze�dA��� Ze�dB��� Z dCdD� Z!dEdF� Z"dGdH� Z#dIdJ� Z$dKdL� Z%dMdN� Z&e'j(dOdP� �Z)d�dRdS�Z*d�dTdU�Z+dVdW� Z,d�dXdY�Z-dZd[� Z.d\d]� Z/d^d_� Z0d�d`da�Z1edbdc� �Z2d�dfdg�Z3dhdi� Z4djdk� Z5dldm� Z6dndo� Z7dpdq� Z8drds� Z9e�dt��� Z:e�du�Z;d�dwdx�Z<e�dy��� Z=dzd{� Z>d|d}� Z?d~d� Z@d�d�� ZAd�d�� ZBd�d�� ZCd�d�� ZDd�d�� ZEe�d���F� ZGd�d�� ZHeIeId�d�d��d��ZJeId�d�d��ZKd�d�� ZLdS )�r/ z'Manage a download/build/install processz Find/get/install Python packagesT)zprefix=Nzinstallation prefix)�zip-ok�zzinstall package as a zipfile)� multi-version�mz%make apps have to require() a version)�upgrade�Uz1force upgrade (searches PyPI for latest versions))zinstall-dir=�dzinstall package to DIR)zscript-dir=rE zinstall scripts to DIR)�exclude-scripts�xzDon't install scripts)�always-copy�az'Copy all needed packages to install dir)z index-url=�iz base URL of Python Package Index)zfind-links=�fz(additional URL(s) to search for packages)zbuild-directory=�bz/download/extract/build in DIR; keep the results)z optimize=�Ozlalso compile with optimization: -O1 for "python -O", -O2 for "python -OO", and -O0 to disable [default: -O0])zrecord=Nz3filename in which to record list of installed files)�always-unzip�Zz*don't install as a zipfile, no matter what)z site-dirs=�Sz)list of directories where .pth files work)�editable�ez+Install specified packages in editable form)�no-deps�Nzdon't install dependencies)zallow-hosts=�Hz$pattern(s) that hostnames must match)�local-snapshots-ok�lz(allow building eggs from local checkouts)�versionNz"print version information and exit)z no-find-linksNz9Don't load find-links defined in packages being installed�userNz!install in user site-package '%s'rQ rS rX rU rZ rc re rh rj r` c C s2 t �dt� d| _d | _| _d | _ | _| _d | _ d | _ d | _d | _d | _ | _d | _ | _| _d | _ | _| _d | _ | _| _d | _d | _d | _d | _d | _d | _d | _d | _d | _ t!j"r�t!j#| _$t!j%| _&nd | _$d | _&d | _'d | _(d | _)| _*d | _+i | _,d | _-| j.j/| _/| j.�0| | j.�1d�� d S )NzVeasy_install command is deprecated. Use build and pip and other standards-based tools.r r/ )2�warnings�warn�EasyInstallDeprecationWarningrk �zip_ok�local_snapshots_ok�install_dir� script_dir�exclude_scripts� index_url� find_links�build_directory�args�optimize�recordrU �always_copy� multi_versionrc �no_deps�allow_hosts�root�prefix� no_reportrj �install_purelib�install_platlib�install_headers�install_lib�install_scripts�install_data�install_base�install_platbase�site�ENABLE_USER_SITE� USER_BASE�install_userbase� USER_SITE�install_usersite� no_find_links� package_index�pth_file�always_copy_from� site_dirs�installed_projects�_dry_run�distribution�verbose�_set_command_options�get_option_dict��selfr7 r7 r8 �initialize_options� sP � �zeasy_install.initialize_optionsc C s"