ó
^†êWc           @@  s„  d  Z  d d l m Z d d l m Z d d l m Z m Z m Z d d l	 Z	 d d l
 m Z m Z m Z m Z d d l m Z d d l m Z m Z d d	 l m Z d
 „  Z d „  Z d d „ Z e e d d d d d d d d ƒZ e e d d d d d d e d d ƒZ e e d d d d d d d e d e ƒZ e e d d d d d d d d d d ƒZ e e d  d! d d" d d d d# ƒZ e e d$ d% d d& d d d d d d' ƒZ  e e d( d) d* d d+ d, d- d d. ƒZ! e e d/ d d0 d d d e d e ƒZ" e e d1 d d2 d3 d4 d d5 d d6 ƒZ# e e d7 d d8 d3 d9 d d: d d; ƒZ$ e e d< d= d, d> d d? d3 d@ d dA d dB ƒZ% e e dC d dD d3 d4 d d5 d e ƒZ& e e dE d dF d3 d4 d d5 d e ƒZ' dG „  Z( e e dH d dI d3 d4 d, d- d dJ ƒZ) e e dK d dL d3 d4 d d d, d- d dM ƒZ* e e dN dO dP d dQ d, dR d e j+ d dS ƒZ, dT „  Z- e e dU d dV d d d e d dW ƒZ. dX „  Z/ dY „  Z0 e e dZ d d[ d d d e d e ƒZ1 d\ „  Z2 e e d] d d[ d d^ d e d e ƒZ3 d_ „  Z4 e e d` d da d d^ d e d e ƒZ5 e e db d dc d d d e d dd ƒZ6 de „  Z7 df „  Z8 dg „  Z9 e e dh di dj dk d dl d, dm d e d dn ƒZ: e e do d dp d d d e; d e ƒZ< e e dq d dp d d^ d e; d dr ƒZ= ds „  Z> dt „  Z? du „  Z@ dv „  ZA dw „  ZB e e dx d dy d e d, dm d dz ƒZC e e d{ d dy d d^ d d| ƒZD e e d} d~ d d d d d e d d€ ƒZE e e d d‚ dƒ d„ d d… d, dm d d† ƒZF e e d‡ d dˆ d d‰ d, dŠ d d‹ ƒZG e e dŒ d d d d‰ d, dŠ d dŽ ƒZH e e d d d d e d d ƒZI e e d‘ d d d e d d’ ƒZJ e e d“ d d” d d d e d d• ƒZK e e d– d— d d˜ d d d e ƒZL d™ „  ZM e e dš d d› d dœ dœ eM d3 d d dž ƒZN e e dŸ d d  d d d e d d¡ ƒZO i d¢ d£ 6e e e e e e  e! e" e# e$ e% e& e' e( e2 e) e* eC eD eK g dŠ 6ZP i d¤ d£ 6e, e- e. e/ e6 g dŠ 6ZQ i d¥ d£ 6eQ dŠ e0 e1 e3 e4 e5 g dŠ 6ZR d S(¦   sD  
shared options and groups

The principle here is to define options once, but *not* instantiate them
globally. One reason being that options with action='append' can carry state
between parses. pip parses general options twice internally, and shouldn't
pass on state. To be consistent, all options will follow this design.

i    (   t   absolute_import(   t   partial(   t   OptionGroupt   SUPPRESS_HELPt   OptionN(   t   FormatControlt   fmt_ctl_handle_mutual_excludet   fmt_ctl_no_binaryt   fmt_ctl_no_use_wheel(   t   PyPI(   t   USER_CACHE_DIRt
   src_prefix(   t   STRONG_HASHESc         C@  s<   t  | |  d ƒ } x" |  d D] } | j | ƒ  ƒ q W| S(   s‡   
    Return an OptionGroup object
    group  -- assumed to be dict with 'name' and 'options' keys
    parser -- an optparse Parser
    t   namet   options(   R   t
   add_option(   t   groupt   parsert   option_groupt   option(    (    s_   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/cmdoptions.pyt   make_option_group   s    c         C@  s#   |  j  s |  j } t | ƒ n  d  S(   N(   t	   use_wheelt   format_controlR   (   R   t   control(    (    s_   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/cmdoptions.pyt   resolve_wheel_no_use_binary$   s    		c         @  su   ˆ  d k r |  ‰  n  ‡  f d †  } d d d g } t t | | ƒ ƒ rq |  j } t | ƒ t j d d d ƒn  d S(	   sÏ   Disable wheels if per-setup.py call options are set.

    :param options: The OptionParser options to update.
    :param check_options: The options to check, if not supplied defaults to
        options.
    c         @  s   t  ˆ  |  d  ƒ S(   N(   t   getattrt   None(   t   n(   t   check_options(    s_   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/cmdoptions.pyt   getname4   s    t   build_optionst   global_optionst   install_optionsse   Disabling all use of wheels due to the use of --build-options / --global-options / --install-options.t
   stackleveli   N(   R   t   anyt   mapR   R   t   warningst   warn(   R   R   R   t   namesR   (    (   R   s_   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/cmdoptions.pyt   check_install_build_global*   s    		
s   -hs   --helpt   destt   helpt   actions
   Show help.s
   --isolatedt   isolated_modet
   store_truet   defaultsS   Run pip in an isolated mode, ignoring environment variables and user configuration.s   --require-virtualenvs   --require-venvt   require_venvs   -vs	   --verboset   verboset   countsD   Give more output. Option is additive, and can be used up to 3 times.s   -Vs	   --versiont   versions   Show version and exit.s   -qs   --quiett   quiets   Give less output.s   --logs
   --log-files   --local-logt   logt   metavart   paths    Path to a verbose appending log.s
   --no-inputt   no_inputs   --proxyt   proxyt   typet   strt    s<   Specify a proxy in the form [user:passwd@]proxy.server:port.s	   --retriest   retriest   inti   sR   Maximum number of retries each connection should attempt (default %default times).s	   --timeouts   --default-timeoutt   sect   timeoutt   floati   s2   Set the socket timeout (default %default seconds).s   --default-vcst   default_vcss   --skip-requirements-regext   skip_requirements_regexc           C@  s@   t  d d d d d d d d d	 d
 g d g  d d d d d d ƒS(   Ns   --exists-actionR(   t   exists_actionR8   t   choicet   choicest   st   it   wt   bR-   R*   t   appendR4   R)   sP   Default action when a path already exists: (s)witch, (i)gnore, (w)ipe, (b)ackup.(   R   (    (    (    s_   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/cmdoptions.pyRB   µ   s    s   --certt   certs   Path to alternate CA bundle.s   --client-certt   client_certsk   Path to SSL client certificate, a single file containing the private key and the certificate in PEM format.s   -is   --index-urls
   --pypi-urlt	   index_urlt   URLs4   Base URL of Python Package Index (default %default).c           C@  s(   t  d d d d d d d d g  d	 d
 ƒS(   Ns   --extra-index-urlR(   t   extra_index_urlsR4   RM   R*   RI   R-   R)   s@   Extra URLs of package indexes to use in addition to --index-url.(   R   (    (    (    s_   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/cmdoptions.pyt   extra_index_urlÞ   s    s
   --no-indext   no_indexsA   Ignore package index (only looking at --find-links URLs instead).c           C@  s+   t  d d d d d d d g  d d	 d
 d ƒS(   Ns   -fs   --find-linksR(   t
   find_linksR*   RI   R-   R4   t   urlR)   s§   If a url or path to an html file, then parse for links to archives. If a local path or file:// url that's a directory, then look for archives in the directory listing.(   R   (    (    (    s_   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/cmdoptions.pyRQ   ò   s    	c           C@  s(   t  d d d d d d g  d d d	 t ƒS(
   Ns   --allow-externalR(   t   allow_externalR*   RI   R-   R4   t   PACKAGER)   (   R   R   (    (    (    s_   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/cmdoptions.pyRS   þ   s    s   --allow-all-externalt   allow_all_externalc           C@  s(   t  d d d d d d d d g  d	 d
 ƒS(   Ns   --trusted-hostR(   t   trusted_hostsR*   RI   R4   t   HOSTNAMER-   R)   sK   Mark this host as trusted, even though it does not have valid or any HTTPS.(   R   (    (    (    s_   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/cmdoptions.pyt   trusted_host  s    s   --no-allow-externalt   store_falsec           C@  s+   t  d d d d d d d g  d d	 d
 t ƒS(   Ns   --allow-unverifieds   --allow-insecureR(   t   allow_unverifiedR*   RI   R-   R4   RT   R)   (   R   R   (    (    (    s_   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/cmdoptions.pyt   allow_unsafe+  s    	s   --no-allow-insecuret   allow_all_insecures   --process-dependency-linkst   process_dependency_linkss*   Enable the processing of dependency links.c           C@  s+   t  d d d d d d d g  d d	 d
 d ƒS(   Ns   -cs   --constraintR(   t   constraintsR*   RI   R-   R4   t   fileR)   s\   Constrain versions using the given constraints file. This option can be used multiple times.(   R   (    (    (    s_   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/cmdoptions.pyR^   J  s    	c           C@  s+   t  d d d d d d d g  d d	 d
 d ƒS(   Ns   -rs   --requirementR(   t   requirementsR*   RI   R-   R4   R_   R)   sQ   Install from the given requirements file. This option can be used multiple times.(   R   (    (    (    s_   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/cmdoptions.pyR`   U  s    	c           C@  s+   t  d d d d d d d g  d d	 d
 d ƒS(   Ns   -es
   --editableR(   t	   editablesR*   RI   R-   R4   s   path/urlR)   sk   Install a project in editable mode (i.e. setuptools "develop mode") from a local project path or a VCS url.(   R   (    (    (    s_   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/cmdoptions.pyt   editable`  s    	s   --srcs   --sources   --source-dirs   --source-directoryt   src_dirt   dirs˜   Directory to check out editable projects into. The default in a virtualenv is "<venv path>/src". The default for global installs is "<current dir>/src".s   --use-wheelR   s   --no-use-wheels{   Do not Find and prefer wheel archives when searching indexes and find-links locations. DEPRECATED in favour of --no-binary.c         C@  s   t  |  | j ƒ S(   s   Get a format_control object.(   R   R(   (   t   valuesR   (    (    s_   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/cmdoptions.pyt   _get_format_controlŒ  s    c         C@  s/   t  | j |  j ƒ } t | | j | j ƒ d  S(   N(   R   Re   R(   R   t	   no_binaryt   only_binary(   R   t   opt_strt   valueR   t   existing(    (    s_   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/cmdoptions.pyt   _handle_no_binary‘  s    c         C@  s/   t  | j |  j ƒ } t | | j | j ƒ d  S(   N(   R   Re   R(   R   Rh   Rg   (   R   Ri   Rj   R   Rk   (    (    s_   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/cmdoptions.pyt   _handle_only_binary—  s    c           C@  s=   t  d d d d d d t d d d t t ƒ  t ƒ  ƒ d	 d
 ƒS(   Ns   --no-binaryR(   R   R*   t   callbackR8   R9   R-   R)   sR  Do not use binary packages. Can be supplied multiple times, and each time adds to the existing value. Accepts either :all: to disable all binary packages, :none: to empty the set, or one or more package names with commas between them. Note that some packages are tricky to compile and may fail to install when this option is used on them.(   R   Rl   R   t   set(    (    (    s_   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/cmdoptions.pyRg     s
    c           C@  s=   t  d d d d d d t d d d t t ƒ  t ƒ  ƒ d	 d
 ƒS(   Ns   --only-binaryR(   R   R*   Rn   R8   R9   R-   R)   sG  Do not use source packages. Can be supplied multiple times, and each time adds to the existing value. Accepts either :all: to disable all source packages, :none: to empty the set, or one or more package names with commas between them. Packages without binary distributions will fail to install when this option is used on them.(   R   Rm   R   Ro   (    (    (    s_   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/cmdoptions.pyRh   ª  s
    s   --cache-dirt	   cache_dirs   Store the cache data in <dir>.s   --no-cache-dirs   Disable the cache.s	   --no-depss   --no-dependenciest   ignore_dependenciess#   Don't install package dependencies.s   -bs   --builds   --build-dirs   --build-directoryt	   build_dirs/   Directory to unpack packages into and build in.s   --install-optionR    RI   R   s"  Extra arguments to be supplied to the setup.py install command (use like --install-option="--install-scripts=/usr/local/bin"). Use multiple --install-option options to pass multiple options to setup.py install. If you are using an option with a directory path, be sure to use absolute path.s   --global-optionR   sT   Extra global options to be supplied to the setup.py call before the install command.s
   --no-cleans!   Don't clean up build directories.s   --presY   Include pre-release and development versions. By default, pip only finds stable versions.s   --disable-pip-version-checkt   disable_pip_version_checks{   Don't periodically check PyPI to determine whether a new version of pip is available for download. Implied with --no-index.s   -Zs   --always-unzipt   always_unzipc         C@  s®   | j  j s i  | j  _ n  y | j d d ƒ \ } } Wn" t k
 r[ | j d | ƒ n X| t k r‹ | j d | d j t ƒ f ƒ n  | j  j j | g  ƒ j | ƒ d S(   sk   Given a value spelled "algo:digest", append the digest to a list
    pointed to in a dict by the algo name.t   :i   sT   Arguments to %s must be a hash name followed by a value, like --hash=sha256:abcde...s&   Allowed hash algorithms for %s are %s.s   , N(	   Re   t   hashest   splitt
   ValueErrort   errorR   t   joint
   setdefaultRI   (   R   Ri   Rj   R   t   algot   digest(    (    s_   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/cmdoptions.pyt   _merge_hash  s    		s   --hashRv   Rn   t   stringsg   Verify that the package's archive matches this hash before installing. Example: --hash=sha256:abcdef...s   --require-hashest   require_hashessž   Require a hash to check each requirement against, for repeatable installs. This option is implied when any package in a requirements file has a --hash option.s   General OptionsR   s   Package Index Optionss4   Package Index Options (including deprecated options)(S   t   __doc__t
   __future__R    t	   functoolsR   t   optparseR   R   R   R$   t	   pip.indexR   R   R   R   t
   pip.modelsR	   t   pip.locationsR
   R   t   pip.utils.hashesR   R   R   R   R'   t   help_t   FalseR+   t   require_virtualenvR/   R1   R2   R3   R6   R7   R;   R>   R@   RA   RB   RJ   RK   t
   simple_urlRL   RO   RP   RQ   RS   RU   RX   t   no_allow_externalR[   t   no_allow_unsafeR]   R^   R`   Rb   t   srct   TrueR   t   no_use_wheelRf   Rl   Rm   Rg   Rh   Rp   t   no_cachet   no_depsRr   R    R   t   no_cleant   preRs   Rt   R~   t   hashR€   t   general_groupt   non_deprecated_index_groupt   index_group(    (    (    s_   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/cmdoptions.pyt   <module>	   sl  "																																																															