ó
Ð²Ebc           @@  sH  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 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 d  d
 l m Z d  d l m Z d  d l m Z m Z e rd  d l m Z d  d l m Z d  d l  m! Z! n  e j" e# ƒ Z$ d e
 f d „  ƒ  YZ% d S(   i    (   t   absolute_importN(   t
   WheelCache(   t
   cmdoptions(   t   RequirementCommandt   with_cleanup(   t   SUCCESS(   t   CommandError(   t   get_requirement_tracker(   t
   ensure_dirt   normalize_path(   t   TempDirectory(   t   MYPY_CHECK_RUNNING(   t   buildt   should_build_for_wheel_command(   t   Values(   t   List(   t   InstallRequirementt   WheelCommandc           B@  s,   e  Z d  Z d Z d „  Z e 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.

    sõ   
      %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> ...c         C@  sW  |  j  j d d d d d d d t j d d	 ƒ|  j  j t j ƒ  ƒ |  j  j t j ƒ  ƒ |  j  j t j ƒ  ƒ |  j  j d
 d d d d d d d d ƒ|  j  j t j ƒ  ƒ |  j  j t j	 ƒ  ƒ |  j  j t j
 ƒ  ƒ |  j  j t j ƒ  ƒ |  j  j t j ƒ  ƒ |  j  j t j ƒ  ƒ |  j  j t j ƒ  ƒ |  j  j t j ƒ  ƒ |  j  j t j ƒ  ƒ |  j  j t j ƒ  ƒ |  j  j t j ƒ  ƒ |  j  j d d d d d d t d d ƒ|  j  j d d d d d d d d d ƒ|  j  j d d d d t d d ƒ|  j  j t j ƒ  ƒ t j t j |  j ƒ } |  j j d | ƒ |  j j d |  j  ƒ 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   --no-verifyt	   no_verifyt
   store_trues%   Don't verify if built wheel is valid.s   --global-optiont   global_optionssZ   Extra global options to be supplied to the setup.py call before the 'bdist_wheel' command.s   --presY   Include pre-release and development versions. By default, pip only finds stable versions.i    (   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   require_hashest   make_option_groupt   index_groupt   parsert   insert_option_group(   t   selft
   index_opts(    (    s9   /tmp/pip-build-UPPWic/pip/pip/_internal/commands/wheel.pyt   add_options3   sb    							c         C@  s„  t  j | ƒ |  j | ƒ } |  j | | ƒ } t | j | j ƒ } t | j ƒ | _ t	 | j ƒ |  j
 t ƒ  ƒ } t d | j d d d t ƒ } |  j | | | | ƒ } |  j d | d | d | d | d	 | d
 | j d t ƒ }	 |  j d |	 d	 | d | d | d | j d | j ƒ }
 |  j | ƒ |
 j | d t ƒ} g  } xL | j j ƒ  D]; } | j rq|	 j | ƒ qRt | ƒ rR| j | ƒ qRqRWt | d | d | j d | j p¶g  d | j  pÅg  ƒ\ } } x‹ | D]ƒ } | j! ró| j! j sùt" ‚ | j# st" ‚ y t$ j% | j# | j ƒ WqØt& k
 rZ} t' j( d | j) | ƒ | j | ƒ qØXqØWt* | ƒ d k r€t+ d ƒ ‚ n  t, S(   Nt   deletet   kindt   wheelt   globally_managedt   temp_build_dirR   t   req_trackert   sessiont   findert   download_dirt   use_user_sitet   preparert   wheel_cacheR-   R'   t   check_supported_wheelst   verifyR   R   s    Building wheel for %s failed: %si    s"   Failed to build one or more wheels(-   R   t   check_install_build_globalt   get_default_sessiont   _build_package_finderR   t	   cache_dirt   format_controlR	   R   R   t   enter_contextR   R
   t   no_cleant   Truet   get_requirementst   make_requirement_preparerR1   t   make_resolverR-   R'   t   trace_basic_infot   resolveR+   t   valuest   is_wheelt   save_linked_requirementR   R   R   R   R   R   t   linkt   AssertionErrort   local_file_patht   shutilt   copyt   OSErrort   loggert   warningt   namet   lenR   R   (   R7   R   t   argsR@   RA   RE   R?   t	   directoryt   reqsRD   t   resolvert   requirement_sett   reqs_to_buildt   reqt   build_successest   build_failurest   e(    (    s9   /tmp/pip-build-UPPWic/pip/pip/_internal/commands/wheel.pyt   runv   sp    
							
(   t   __name__t
   __module__t   __doc__t   usageR9   R   Rl   (    (    (    s9   /tmp/pip-build-UPPWic/pip/pip/_internal/commands/wheel.pyR      s   	C(&   t
   __future__R    t   loggingR!   R[   t   pip._internal.cacheR   t   pip._internal.cliR   t   pip._internal.cli.req_commandR   R   t   pip._internal.cli.status_codesR   t   pip._internal.exceptionsR   t   pip._internal.req.req_trackerR   t   pip._internal.utils.miscR   R	   t   pip._internal.utils.temp_dirR
   t   pip._internal.utils.typingR   t   pip._internal.wheel_builderR   R   t   optparseR   t   typingR   t   pip._internal.req.req_installR   t	   getLoggerRm   R^   R   (    (    (    s9   /tmp/pip-build-UPPWic/pip/pip/_internal/commands/wheel.pyt   <module>   s&   