σ
b]c           @@  sχ   d  d l  m 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 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 d  d l m Z e j e  Z d e	 f d     YZ d S(   i    (   t   absolute_importN(   t
   WheelCache(   t
   cmdoptions(   t   RequirementCommand(   t   CommandErrort   PreviousBuildDirError(   t   Resolver(   t   RequirementPreparer(   t   RequirementSet(   t   RequirementTracker(   t   TempDirectory(   t   WheelBuildert   WheelCommandc           B@  s2   e  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: 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.

    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 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 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	   no_binaryt   only_binaryt   prefer_binaryt   no_build_isolationt
   use_pep517t   no_use_pep517t   constraintst   editablet   requirementst   srct   ignore_requires_pythont   no_depst	   build_dirt   progress_bart   Falset   no_cleant   require_hashest   make_option_groupt   index_groupt   parsert   insert_option_group(   t   selft   argst   kwR   t
   index_opts(    (    s;   lib/python2.7/site-packages/pip/_internal/commands/wheel.pyR   .   s\    			c      %   C@  sy  t  j |  | j r1 t j j | j  | _ n  t j j | j  | _ |  j |  } |  j | |  } | j	 p| | j } t
 | j | j  } t   Ο} t | j d | d d «} t d | j  }	 znyJ|  j |	 | | | | |  j |  t d | j d | j d d  d | j d	 | j d
 | j d |  }
 t d |
 d | d | d | d t d d d t d | j d | j d t d | j d | j  } | j |	  t  | |
 | d | j! pΐg  d | j" pΟg  d | j	 } | j# |	 j$ j%   d | } t& |  d k rt' d   n  Wn t( k
 r=t | _	   n XWd  | j	 sb|	 j)   | j*   n  XWd  QXWd  QXWd  QXd  S(   Nt   deletet   kindR   R0   R,   t   src_dirt   download_dirt   wheel_download_dirR-   t   build_isolationt   req_trackert   preparert   findert   sessiont   wheel_cachet   use_user_sitet   upgrade_strategys   to-satisfy-onlyt   force_reinstallt   ignore_dependenciesR*   t   ignore_installedt   isolatedR$   R   R   R/   i    s"   Failed to build one or more wheels(+   R   t   check_install_build_globalR,   R   t   patht   abspathR;   t   _build_sessiont   _build_package_finderR/   R   t	   cache_dirt   format_controlR	   R
   R   R0   t   populate_requirement_sett   nameR   t   NoneR   R-   R>   R   R.   RG   R*   t   Truet   isolated_modeR$   t   resolveR   R   R   t   buildR(   t   valuest   lenR   R   t   cleanup_filest   cleanup(   R5   R   R6   RB   RA   t   build_deleteRC   R?   t	   directoryt   requirement_setR@   t   resolvert   wbt   build_failures(    (    s;   lib/python2.7/site-packages/pip/_internal/commands/wheel.pyt   runl   sr    	  											
(   t   __name__t
   __module__t   __doc__RR   t   usaget   summaryR   Rb   (    (    (    s;   lib/python2.7/site-packages/pip/_internal/commands/wheel.pyR      s   	>(   t
   __future__R    t   loggingR   t   pip._internal.cacheR   t   pip._internal.cliR   t   pip._internal.cli.base_commandR   t   pip._internal.exceptionsR   R   t   pip._internal.legacy_resolveR   t    pip._internal.operations.prepareR   t   pip._internal.reqR   t   pip._internal.req.req_trackerR	   t   pip._internal.utils.temp_dirR
   t   pip._internal.wheelR   t	   getLoggerRc   t   loggerR   (    (    (    s;   lib/python2.7/site-packages/pip/_internal/commands/wheel.pyt   <module>   s   