σ
^\kdc           @@  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 m Z m Z d  d l m Z d  d	 l m Z d  d
 l m Z e j j e e j  d  Z d e f d     YZ d S(   i    (   t   absolute_importN(   t   Command(   t   PackageFinder(   t   logger(   t   CommandErrort   PreviousBuildDirError(   t   InstallRequirementt   RequirementSett   parse_requirements(   t   normalize_path(   t   WheelBuilder(   t
   cmdoptionst
   wheelhouset   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: 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] <vcs project url> ...
      %prog [options] <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 d d	 | j t j j    | j t j	 j    | j d
 d d d d d d d d | j t j
 j    | j t j j    | j t j j    | j t j 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 |  j  } |  j j d |  |  j j d |  d  S(   Ns   -ws   --wheel-dirt   destt	   wheel_dirt   metavart   dirt   defaultt   helpsA   Build wheels into <dir>, where the default is '<cwd>/wheelhouse'.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   DEFAULT_WHEEL_DIRR   t	   use_wheelt   maket   no_use_wheelt   requirementst   download_cachet   no_depst	   build_dirt   Falset   no_cleant   make_option_groupt   index_groupt   parsert   insert_option_group(   t   selft   argst   kwR   t
   index_opts(    (    s9   /var/www/testScraper/venv/build/pip/pip/commands/wheel.pyR   (   sF    		c         C@  s8  y d d  l  } Wn t k
 r/ t d   n Xy d d  l } Wn t k
 r_ t d   n Xt | d  s~ t d   n  | j g | j } | j r½ t j	 d d j
 |   g  } n  | j rΩ t j d d  n  | j rt j d d	  | | j 7} n  |  j |  } t d
 | j d | d | j d | j d | j d | j d | j d | j d |  	} t j j | j  | _ t d | j d d  d d  d | j d | j d t d | d | j   } t j j! | j   sκt j" | j   n  x' | D] }	 | j# t$ j% |	 d    qρWxj | j& D]_ }
 xV t' |
 d | d | d | D]6 } | j( rlt j	 d | j)  qCn  | j# |  qCWqW| j* s΅i |  j+ d 6} d | } t j, |  d  Sze yA t- | | | j  d | j. pΩg  d  | j/ pθg  } | j0   Wn t1 k
 rt | _2   n XWd  | j2 s3| j3   n  Xd  S(!   Ni    sN   'pip wheel' requires the 'wheel' package. To fix this, run:  pip install wheelsp   'pip wheel' requires setuptools >= 0.8 for dist-info support. To fix this, run: pip install --upgrade setuptoolst   DistInfoDistributions   Ignoring indexes: %st   ,s   1.7s   --use-mirrors has been deprecated and will be removed in the future. Explicit uses of --index-url and/or --extra-index-url is suggested.s   --mirrors has been deprecated and will be removed in  the future. Explicit uses of --index-url and/or --extra-index-url is suggested.t
   find_linkst
   index_urlsR    t   allow_externalt   allow_unverifiedt   allow_all_externalt   allow_all_prereleasest   process_dependency_linkst   sessionR&   t   src_dirt   download_dirR$   t   ignore_dependenciest   ignore_installedt   wheel_download_dirt   finderR   s   ignoring %st   namesL   You must give at least one requirement to %(name)s (see "pip help %(name)s")R   R   (4   t   wheel.bdist_wheelt   ImportErrorR   t   pkg_resourcest   hasattrt	   index_urlt   extra_index_urlst   no_indexR   t   notifyt   joint   use_mirrorst
   deprecatedt   mirrorst   _build_sessionR   R3   R    R5   R6   R7   t   preR9   t   ost   patht   abspathR&   R   t   NoneR$   R=   t   TrueR   t   existst   makedirst   add_requirementR   t	   from_lineR#   R   t   editablet   urlt   has_requirementsRA   t   errorR
   R   R   t   buildR   R(   t   cleanup_files(   R-   R   R.   R   RD   R4   R:   R@   t   requirement_setRA   t   filenamet   reqt   optst   msgt   wb(    (    s9   /var/www/testScraper/venv/build/pip/pip/commands/wheel.pyt   runU   s    				
														 			(   t   __name__t
   __module__t   __doc__RA   t   usaget   summaryR   Re   (    (    (    s9   /var/www/testScraper/venv/build/pip/pip/commands/wheel.pyR      s   	-(   t
   __future__R    RP   t   syst   pip.basecommandR   t	   pip.indexR   t   pip.logR   t   pip.exceptionsR   R   t   pip.reqR   R   R   t   pip.utilR	   t	   pip.wheelR
   t   pipR   RQ   RJ   t   curdirR   R   (    (    (    s9   /var/www/testScraper/venv/build/pip/pip/commands/wheel.pyt   <module>   s   