관리-도구
편집 파일: wheel.cpython-37.pyc
B ��Re � @ s� d dl mZ d dlZd dlZd dlZd dlmZ d dlmZ d dl m Z mZ d dlm Z d dlmZ d dlmZ d d lmZmZ d d lmZ d dlmZ d dlmZmZ er�d d lmZ d dlmZ e� e!�Z"G dd� de �Z#dS )� )�absolute_importN)� WheelCache)� cmdoptions)�RequirementCommand�with_cleanup)�SUCCESS)�CommandError)�get_requirement_tracker)� ensure_dir�normalize_path)� TempDirectory)�MYPY_CHECK_RUNNING)�build�should_build_for_wheel_command)�Values)�Listc @ s( e Zd ZdZdZdd� Zedd� �ZdS )�WheelCommanda� Build Wheel archives for your requirements and dependencies. Wheel is a built-package format, and offers the advantage of not recompiling your software during every install. For more details, see the wheel docs: https://wheel.readthedocs.io/en/latest/ Requirements: setuptools>=0.8, and wheel. 'pip wheel' uses the bdist_wheel setuptools extension from the wheel package to build individual wheels. z� %prog [options] <requirement specifier> ... %prog [options] -r <requirements file> ... %prog [options] [-e] <vcs project url> ... %prog [options] [-e] <local project path> ... %prog [options] <archive url/path> ...c C s| | j jddddtjdd� | j �t�� � | j �t�� � | j �t�� � | j jddd d dd� | j �t�� � | j �t� � � | j �t� � � | j �t�� � | j �t�� � | j �t� � � | j �t�� � | j �t�� � | j �t�� � | j �t�� � | j �t�� � | j jd dd d dd� | j jddddd� | j �t�� � t�tj| j�}| j�d|� | j�d| j � d S )Nz-wz--wheel-dir� wheel_dir�dirzLBuild wheels into <dir>, where the default is the current working directory.)�dest�metavar�default�helpz--build-option� build_options�options�appendz9Extra arguments to be supplied to 'setup.py bdist_wheel'.)r r �actionr z--global-option�global_optionszZExtra global options to be supplied to the setup.py call before the 'bdist_wheel' command.)r r r r z--pre� store_trueFzYInclude pre-release and development versions. By default, pip only finds stable versions.)r r r r )�cmd_opts� add_option�os�curdirr � no_binary�only_binary� prefer_binary�no_build_isolation� use_pep517� no_use_pep517�constraints�editable�requirements�src�ignore_requires_python�no_deps� build_dir�progress_bar�require_hashes�make_option_group�index_group�parser�insert_option_group)�self� index_opts� r8 ��/builddir/build/BUILDROOT/alt-python37-pip-20.2.4-6.el8.x86_64/opt/alt/python37/lib/python3.7/site-packages/pip/_internal/commands/wheel.py�add_options2 sV zWheelCommand.add_optionsc C s� t �|� | �|�}| �||�}|jp*|j }t|j|j�}t |j �|_ t|j � | �t � �}t|j|ddd�}| �||||�} | j||||||j dd�} | j| ||||j|jd�}| �|� |j| dd�}dd � |j�� D �} t| ||jp�g |jp�g d �\}}x�|D ]|}|j�r|jj�s t�|j�s,t�yt� |j|j � W n> t!k �r~ } zt"�#d|j$|� |�%|� W d d }~X Y nX �qW t&|�dk�r�t'd ��t(S )N�wheelT)�delete�kind�globally_managedF)�temp_build_dirr �req_tracker�session�finder�wheel_download_dir� use_user_site)�preparerrB r �wheel_cacher- r'