o
    a+)h                     @   s   d dl Z d dlZd dlZd dlmZ d dlmZ d dlmZ d dl	m
Z
 d dlmZmZ d dlmZ d dlmZ d d	lmZ d d
lmZmZmZ d dlmZ d dlmZmZ d dlmZ d dlm Z m!Z! e "e#Z$G dd deZ%dS )    N)Values)List)
WheelCache)
cmdoptions)RequirementCommandwith_cleanup)SUCCESS)CommandError)get_build_tracker)InstallRequirementLegacySetupPyOptionsCheckModecheck_legacy_setup_py_options)
deprecated)
ensure_dirnormalize_path)TempDirectory)buildshould_build_for_wheel_commandc                   @   s<   e Zd ZdZdZdddZededee	 de
fd	d
ZdS )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/

    'pip wheel' uses the build system interface as described here:
    https://pip.pypa.io/en/stable/reference/build-system/

    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> ...returnNc                 C   s  | j jddddtjdd | 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  | j t  | j jddd	d
dd | j t  | j t  | j t  | j jdd	d
dd | j t  ttj| 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--no-verify	no_verify
store_trueFz%Don't verify if built wheel is valid.)r   actionr   r   z--prezYInclude 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check_build_depsconstraintseditablerequirementssrcignore_requires_pythonno_depsprogress_barconfig_settingsbuild_optionsglobal_optionsrequire_hashesmake_option_groupindex_groupparserinsert_option_group)self
index_opts r;   [C:\Users\User\Downloads\Proyecto_IoT\venv\Lib\site-packages\pip/_internal/commands/wheel.pyadd_options.   sZ   
zWheelCommand.add_optionsoptionsargsc                 C   s  |  |}| ||}t|j|j}t|j|_t|j | t	 }t
|j ddd}| ||||}t||tj d|jv rFt|j}n|jjrStdddddd	 t|j|j}| j||||||jd
| jd}	| j|	||||j|jd}
| | |
j|dd}g }|j D ]}|jr|	| qt|r|| qt |||j! |j"pg |j#pg d\}}|D ]9}|j$r|j$jsJ |j%sJ z
t&'|j%|j W q t(y } zt)*d|j+| || W Y d }~qd }~ww t,|dkrt-dt.S )NwheelT)deletekindglobally_managedzno-binary-enable-wheel-cachez--no-binary currently disables reading from the cache of locally built wheels. In the future --no-binary will not influence the wheel cache.z to use the --no-cache-dir optioni,  z23.1)reasonreplacementfeature_flagissuegone_inF)temp_build_dirr>   build_trackersessionfinderdownload_diruse_user_site	verbosity)preparerrL   r>   wheel_cacher.   r'   )check_supported_wheels)rQ   verifyr2   r3   z Building wheel for %s failed: %sr   z"Failed to build one or more wheels)/get_default_session_build_package_finderr   	cache_dirformat_controlr   r   r   enter_contextr
   r   no_cleanget_requirementsr   r   WHEELfeatures_enabledr#   r   make_requirement_preparerrO   make_resolverr.   r'   trace_basic_inforesolver,   valuesis_wheelsave_linked_requirementr   appendr   r   r2   r3   linklocal_file_pathshutilcopyOSErrorloggerwarningnamelenr	   r   )r9   r>   r?   rK   rL   rQ   rJ   	directoryreqsrP   resolverrequirement_setreqs_to_buildreqbuild_successesbuild_failureser;   r;   r<   runj   s   



	


zWheelCommand.run)r   N)__name__
__module____qualname____doc__usager=   r   r   r   strintrw   r;   r;   r;   r<   r      s    
< r   )&loggingr!   rg   optparser   typingr   pip._internal.cacher   Zpip._internal.clir   pip._internal.cli.req_commandr   r   pip._internal.cli.status_codesr   pip._internal.exceptionsr	   ,pip._internal.operations.build.build_trackerr
   Zpip._internal.req.req_installr   r   r   pip._internal.utils.deprecationr   pip._internal.utils.miscr   r   pip._internal.utils.temp_dirr   pip._internal.wheel_builderr   r   	getLoggerrx   rj   r   r;   r;   r;   r<   <module>   s$    
