관리-도구
편집 파일: wheel.cpython-36.pyc
3 �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 ej 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 jtj� � | j jtj� � | j jtj� � | j jddd d dd� | j jtj� � | j jtj � � | j jtj � � | j jtj� � | j jtj� � | j jtj � � | j jtj� � | j jtj� � | j jtj� � | j jtj� � | j jtj� � | j jd dd d dd� | j jddddd� | j jtj� � tjtj| j�}| jjd|� | jjd| 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-python36-pip-20.2.4-5.el8.x86_64/opt/alt/python36/lib/python3.6/site-packages/pip/_internal/commands/wheel.py�add_options2 sV zWheelCommand.add_optionsc C s� t j|� | j|�}| j||�}|jp*|j }t|j|j�}t |j �|_ t|j � | jt � �}t|j|ddd�}| j||||�} | j||||||j dd�} | j| ||||j|jd�}| j|� |j| dd�}dd � |jj� D �} t| ||jp�g |jp�g d �\}}x�|D ]|}|j�r|jj�s t�|j�s,t�ytj |j|j � W n> t!k �r~ } z t"j#d|j$|� |j%|� W Y d d }~X 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'