
    fXf                     
   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 j"        e#          Z$ G 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                   N    e Zd ZdZdZd	dZededee	         de
f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                    | j                             ddddt          j        d           | j                             t	          j                               | j                             t	          j                               | j                             t	          j                               | j                             t	          j                               | j                             t	          j	                               | j                             t	          j
                               | j                             t	          j                               | j                             t	          j                               | j                             t	          j                               | j                             t	          j                               | j                             t	          j                               | j                             t	          j                               | j                             t	          j                               | j                             t	          j                               | j                             ddd	d
d           | j                             t	          j                               | j                             t	          j                               | j                             t	          j                               | j                             dd	d
d           | j                             t	          j                               t	          j        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_optss     U/var/www/html/Qu*py/bism/lib/python3.11/site-packages/pip/_internal/commands/wheel.pyadd_optionszWheelCommand.add_options.   s     I- 	! 
	
 
	
 
	
 	  !5!7!7888  !7!9!9:::  !9!;!;<<<  !>!@!@AAA  !6!8!8999  !9!;!;<<<  !<!>!>???  !7!9!9:::  !4!6!6777  !8!:!:;;;  !1!1222  !B!D!DEEE  !3!5!5666  !8!:!:;;;  8 	! 	
 	
 	
 	  !;!=!=>>>  !9!;!;<<<  !:!<!<===  2 	! 	
 	
 	
 	  !:!<!<===1"K
 


 	'':666''4=99999    optionsargsc           
         |                      |          }|                     ||          }t          |j        |j                  }t          |j                  |_        t          |j                   |                     t                                }t          |j         dd          }|                     ||||          }t          ||t          j                   d|j        v rt          |j                  }n:|j        j        rt%          ddddd	           t          |j        |j                  }|                     ||||||j        d
| j                  }	|                     |	||||j        |j                  }
|                     |           |
                    |d          }g }|j                                        D ]C}|j        r|	                    |           t=          |          r|                    |           DtA          |||j!         |j"        pg |j#        pg           \  }}|D ]}|j$        r|j$        j        sJ |j%        sJ 	 tM          j'        |j%        |j                   A# tP          $ r@}tR          *                    d|j+        |           |                    |           Y d }~d }~ww xY wtY          |          dk    rt[          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_dirrA   build_trackersessionfinderdownload_diruse_user_site	verbosity)preparerrP   rA   wheel_cacher1   r*   )check_supported_wheels)rU   verifyr5   r6   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_preparerrS   make_resolverr1   r*   trace_basic_inforesolver/   valuesis_wheelsave_linked_requirementr   appendr   r   r5   r6   linklocal_file_pathshutilcopyOSErrorloggerwarningnamelenr
   r	   )r<   rA   rB   rO   rP   rU   rN   	directoryreqsrT   resolverrequirement_setreqs_to_buildreqbuild_successesbuild_failureses                    r>   runzWheelCommand.runj   su   **733++GW== !2G4JKK*7+<==7$%%%**+<+>+>??!''!
 
 
	 $$T7FGDD%T8>	
 	
 	
 *W-EEE %W%677KK%/ J !C!?"
 
 
 
 %W%68NOOK11$' *n 2 	
 	
 %%##*#A) & 
 
 	f%%%"**4*MM24"/6688 	* 	*C| *005555/44 *$$S))) +0#))!/52"17R+
 +
 +
' # 	+ 	+C81 1111&&&&+C/1BCCCC + + +6H  
 %%c********+ ~!##CDDDs   I<<
K6KK)r   N)__name__
__module____qualname____doc__usager?   r   r   r   strintr{    r@   r>   r   r      s|        
 
0E:: :: :: ::x `6 `c `s ` ` ` \` ` `r@   r   )&loggingr$   rk   optparser   typingr   pip._internal.cacher   pip._internal.clir   pip._internal.cli.req_commandr   r   pip._internal.cli.status_codesr	   pip._internal.exceptionsr
   ,pip._internal.operations.build.build_trackerr   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   	getLoggerr|   rn   r   r   r@   r>   <module>r      s    				              * * * * * * ( ( ( ( ( ( J J J J J J J J 2 2 2 2 2 2 1 1 1 1 1 1 J J J J J J         
 7 6 6 6 6 6 ? ? ? ? ? ? ? ? 6 6 6 6 6 6 M M M M M M M M		8	$	$q q q q q% q q q q qr@   