HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux spn-python 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64
User: arjun (1000)
PHP: 8.1.2-1ubuntu2.20
Disabled: NONE
Upload Files
File: //lib/python3/dist-packages/pip/_internal/commands/__pycache__/wheel.cpython-310.pyc
o

@%Ne>�@s�ddlZddlZddlZddlmZddlmZddlmZddl	m
Z
ddlmZm
Z
ddlmZddlmZdd	lmZdd
lmZddlmZmZddlmZdd
lmZmZe�e�Z Gdd�de�Z!dS)�N)�Values)�List)�
WheelCache)�
cmdoptions)�RequirementCommand�with_cleanup)�SUCCESS)�CommandError)�InstallRequirement)�get_requirement_tracker)�
ensure_dir�normalize_path)�
TempDirectory)�build�should_build_for_wheel_commandc@s<eZdZdZdZddd�Zededee	de
fd	d
��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> ...�returnNcCsv|jjddddtjdd�|j�t���|j�t���|j�t���|j�t���|j�t�	��|j�t�
��|j�t���|j�t���|j�t�
��|j�t���|j�t���|j�t���|j�t���|jjddd	d
dd�|j�t���|j�t���|jjd
d	d
dd�|j�t���t�tj|j�}|j�d|�|j�d|j�dS)Nz-wz--wheel-dir�	wheel_dir�dirzLBuild wheels into <dir>, where the default is the current working directory.)�dest�metavar�default�helpz--no-verify�	no_verify�
store_trueFz%Don't verify if built wheel is valid.)r�actionrrz--prezYInclude pre-release and development versions. By default, pip only finds stable versions.)rrrr)�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�progress_bar�
build_options�global_options�require_hashes�make_option_group�index_group�parser�insert_option_group)�self�
index_opts�r6�>/usr/lib/python3/dist-packages/pip/_internal/commands/wheel.py�add_options+sV���
�zWheelCommand.add_options�options�argscCs�t�|�|�|�}|�||�}t|j|j�}t|j�|_t	|j�|�
t��}t|j
ddd�}|�||||�}|j||||||jd|jd�}	|j|	||||j|jd�}
|�|�|
j|dd�}g}|j��D]}
|
jrs|	�|
�qht|
�r||�|
�qht|||j|jp�g|jp�gd�\}}|D]9}
|
j r�|
j js�J�|
j!s�J�z
t"�#|
j!|j�Wq�t$y�}zt%�&d	|
j'|�|�|
�WYd}~q�d}~wwt(|�d
kr�t)d��t*S)N�wheelT)�delete�kind�globally_managedF)�temp_build_dirr9�req_tracker�session�finder�download_dir�
use_user_site�	verbosity)�preparerrBr9�wheel_cacher*r$)�check_supported_wheels)rG�verifyr-r.z Building wheel for %s failed: %srz"Failed to build one or more wheels)+r�check_install_build_global�get_default_session�_build_package_finderr�	cache_dir�format_controlr
rr�
enter_contextrr�no_clean�get_requirements�make_requirement_preparerrE�
make_resolverr*r$�trace_basic_info�resolver(�values�is_wheel�save_linked_requirementr�appendrrr-r.�link�local_file_path�shutil�copy�OSError�logger�warning�name�lenr	r)r4r9r:rArBrGr@�	directory�reqsrF�resolver�requirement_set�
reqs_to_build�req�build_successes�build_failures�er6r6r7�runes�


���
	
�
�
���zWheelCommand.run)rN)�__name__�
__module__�__qualname__�__doc__�usager8rrr�str�intrlr6r6r6r7rs
: r)"�loggingrr\�optparser�typingr�pip._internal.cacher�pip._internal.clir�pip._internal.cli.req_commandrr�pip._internal.cli.status_codesr�pip._internal.exceptionsr	�pip._internal.req.req_installr
�pip._internal.req.req_trackerr�pip._internal.utils.miscrr
�pip._internal.utils.temp_dirr�pip._internal.wheel_builderrr�	getLoggerrmr_rr6r6r6r7�<module>s"