σ
^κWc           @@  sι   d  d l  m Z d  d l Z d  d l Z d  d l 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 d  d	 l m Z m Z d  d
 l m Z e j e  Z d e f d     YZ d S(   i    (   t   absolute_importN(   t   RequirementCommand(   t   CommandErrort   PreviousBuildDirError(   t   RequirementSet(   t   import_or_raise(   t   BuildDirectory(   t   RemovedInPip10Warning(   t
   WheelCachet   WheelBuilder(   t
   cmdoptionst   WheelCommandc           B@  s;   e  Z d  Z d Z d Z d Z d   Z d   Z d   Z RS(   s΄  
    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: http://wheel.readthedocs.org/en/latest.

    Requirements: setuptools>=0.8, and wheel.

    'pip wheel' uses the bdist_wheel setuptools extension from the wheel
    package to build individual wheels.

    t   wheelsυ   
      %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> ...s$   Build wheels from your requirements.c         O@  sά  t  t |   j | |   |  j } | j d d d d d d d t j d d	 | j t j    | j t j	    | j t j
    | j t j    | j d
 d d d d d d d d | j t j    | j t j    | j t j    | j t j    | j t j    | j t j    | j d d d d d d d d d | j d d d d t d d | j t j    | j t j    t j t j |  j  } |  j j d |  |  j j d |  d  S(   Ns   -ws   --wheel-dirt   destt	   wheel_dirt   metavart   dirt   defaultt   helpsL   Build wheels into <dir>, where the default is the current working directory.s   --build-optiont   build_optionst   optionst   actiont   appends9   Extra arguments to be supplied to 'setup.py bdist_wheel'.s   --global-optiont   global_optionssZ   Extra global options to be supplied to the setup.py call before the 'bdist_wheel' command.s   --pret
   store_truesY   Include pre-release and development versions. By default, pip only finds stable versions.i    (   t   superR   t   __init__t   cmd_optst
   add_optiont   ost   curdirR
   t	   use_wheelt   no_use_wheelt	   no_binaryt   only_binaryt   constraintst   editablet   requirementst   srct   no_depst	   build_dirt   Falset   no_cleant   require_hashest   make_option_groupt   index_groupt   parsert   insert_option_group(   t   selft   argst   kwR   t
   index_opts(    (    sc   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/commands/wheel.pyR   .   sT    			c         C@  sD   t  d t d  t  d t d  } t | d  s@ t d   n  d  S(   Ns   wheel.bdist_wheelsM   'pip wheel' requires the 'wheel' package. To fix this, run: pip install wheelt   pkg_resourcessp   'pip wheel' requires setuptools >= 0.8 for dist-info support. To fix this, run: pip install --upgrade setuptoolst   DistInfoDistribution(   R   R   t   hasattr(   R0   R4   (    (    sc   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/commands/wheel.pyt   check_required_packagesg   s    	c         C@  s[  |  j    t j |  t j |  | j r@ t j d t  n  | j r\ t j d t  n  | j	 rx t j d t  n  | j
 g | j } | j rΆ t j d d j |   g  } n  | j rΪ t j j | j  | _ n  |  j |  l} |  j | |  } | j p| j } t | j | j  } t | j d | } t d | d | j d	 d  d
 | j d t d | j  d | d | d | j! d | j"  
}	 |  j# |	 | | | | |  j$ |  |	 j% sΑd  Szp yL t& |	 | d | j' pίg  d | j( pξg  }
 |
 j)   st* d   n  Wn t+ k
 r/t | _   n XWd  | j sJ|	 j,   n  XWd  QXWd  QXd  S(   Ns   --allow-external has been deprecated and will be removed in the future. Due to changes in the repository protocol, it no longer has any effect.s   --allow-all-external has been deprecated and will be removed in the future. Due to changes in the repository protocol, it no longer has any effect.s   --allow-unverified has been deprecated and will be removed in the future. Due to changes in the repository protocol, it no longer has any effect.s   Ignoring indexes: %st   ,t   deleteR(   t   src_dirt   download_dirt   ignore_dependenciest   ignore_installedt   isolatedt   sessiont   wheel_cachet   wheel_download_dirR+   R   R   s"   Failed to build one or more wheels(-   R7   R
   t   resolve_wheel_no_use_binaryt   check_install_build_globalt   allow_externalt   warningst   warnR   t   allow_all_externalt   allow_unverifiedt	   index_urlt   extra_index_urlst   no_indext   loggert   infot   joinR(   R   t   patht   abspatht   _build_sessiont   _build_package_finderR*   R   t	   cache_dirt   format_controlR   R   R:   t   NoneR<   t   Truet   isolated_modeR   R+   t   populate_requirement_sett   namet   has_requirementsR	   R   R   t   buildR   R   t   cleanup_files(   R0   R   R1   t
   index_urlsR?   t   findert   build_deleteR@   R(   t   requirement_sett   wb(    (    sc   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/commands/wheel.pyt   run{   st    
	
	
	
								 		(	   t   __name__t
   __module__t   __doc__RY   t   usaget   summaryR   R7   Rb   (    (    (    sc   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/commands/wheel.pyR      s   	9	(   t
   __future__R    t   loggingR   RE   t   pip.basecommandR   t   pip.exceptionsR   R   t   pip.reqR   t	   pip.utilsR   t   pip.utils.buildR   t   pip.utils.deprecationR   t	   pip.wheelR   R	   t   pipR
   t	   getLoggerRc   RL   R   (    (    (    sc   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/commands/wheel.pyt   <module>   s   