
 XI                 @   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 Gd d   d e  Z d S)    )absolute_importN)Command)PackageFinder)logger)CommandErrorPreviousBuildDirError)InstallRequirementRequirementSetparse_requirements)normalize_path)WheelBuilder)
cmdoptionsZ
wheelhousec                   sF   e  Z d  Z d Z d Z d Z d Z   f d d   Z d d   Z   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: 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.

    wheelz
      %prog [options] <requirement specifier> ...
      %prog [options] -r <requirements file> ...
      %prog [options] <vcs project url> ...
      %prog [options] <local project path> ...
      %prog [options] <archive url/path> ...z$Build wheels from your requirements.c                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 d d d | j t j j    t j t j |  j  } |  j j d |  |  j j d |  d  S)Nz-wz--wheel-dirdest	wheel_dirmetavardirdefaulthelpzABuild wheels into <dir>, where the default is '<cwd>/wheelhouse'.z--build-optionbuild_optionsoptionsactionappendz9Extra arguments to be supplied to 'setup.py bdist_wheel'.z--global-optionglobal_optionszZExtra global options to be supplied to the setup.py call before the 'bdist_wheel' command.z--pre
store_trueFzYInclude pre-release and development versions. By default, pip only finds stable versions.r   )superr   __init__cmd_opts
add_optionDEFAULT_WHEEL_DIRr   	use_wheelmakeno_use_wheelrequirementsdownload_cacheno_deps	build_dirno_cleanmake_option_groupindex_groupparserinsert_option_group)selfargskwr   
index_opts)	__class__ =/home/ubuntu/projects/ifolica/build/pip/pip/commands/wheel.pyr   (   sF    		zWheelCommand.__init__c          $   C   s]  y d d  l  } Wn@ t k
 rR t j d% k  r8 d } n d } t d |   Yn Xy d d  l } Wn t k
 r t d   Yn 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 d 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( rt
 j d  | j)  qgn  |	 j# |  qgWqBW|	 j* si |  j+ d! 6} d" | } t
 j, |  d  Szf yA t- |	 | | j  d# | j. pg  d$ | j/ pg  } | j0   Wn t1 k
 r=d | _2   Yn XWd  | j2 sX|	 j3   n  Xd  S)&Nr      zpython-wheelzpython3-wheelzS'pip wheel' requires the 'wheel' package. To fix this, run: sudo apt-get install %szp'pip wheel' requires setuptools >= 0.8 for dist-info support. To fix this, run: pip install --upgrade setuptoolsDistInfoDistributionzIgnoring indexes: %s,z1.7z--use-mirrors has been deprecated and will be removed in the future. Explicit uses of --index-url and/or --extra-index-url is suggested.z--mirrors has been deprecated and will be removed in  the future. Explicit uses of --index-url and/or --extra-index-url is suggested.
find_links
index_urlsr!   allow_externalallow_unverifiedallow_all_externalallow_all_prereleasesprocess_dependency_linkssessionr'   src_dirdownload_dirr%   ignore_dependenciesignore_installedTwheel_download_dirfinderr   zignoring %snamezLYou must give at least one requirement to %(name)s (see "pip help %(name)s")r   r   )r4   )4wheel.bdist_wheelImportErrorsysversion_infor   pkg_resourceshasattr	index_urlextra_index_urlsno_indexr   notifyjoinuse_mirrors
deprecatedmirrors_build_sessionr   r7   r!   r9   r:   r;   prer=   ospathabspathr'   r	   r%   rA   r   existsmakedirsadd_requirementr   	from_liner$   r
   editableurlhas_requirementsrE   errorr   r   r   buildr   r(   cleanup_files)r-   r   r.   r   debian_packagerJ   r8   r>   rD   requirement_setrE   filenamereqoptsmsgwbr2   r2   r3   runU   s    					
																	zWheelCommand.run)	__name__
__module____qualname____doc__rE   usagesummaryr   rj   r2   r2   )r1   r3   r      s   -r   )
__future__r   rV   rH   pip.basecommandr   	pip.indexr   pip.logr   pip.exceptionsr   r   pip.reqr   r	   r
   pip.utilr   	pip.wheelr   pipr   rW   rP   curdirr    r   r2   r2   r2   r3   <module>   s   