kgh2dZddlZddlmZddlmZddlmZmZm Z m Z ddl m Z ddl mZddlmZdd lmZdd lmZmZdd lmZdd lmZdd lmZddlmZddlmZddlm Z ddl!m"Z"ddl#m$Z$m%Z%m&Z&m'Z'ddl(m)Z)ddl*m+Z+ddl,m-Z-ddl.m/Z/ddl0m1Z1m2Z2m3Z3ej4e5Z6e3j7e3j8e3j9gZ:dedefdZ;GddeZ.configure_tempdir_registry8s4' * *A   5 ) ) ) ) * *selfoptionsargsc|jJ|jr|j |||S#t$r|jwxYwN)tempdir_registryno_cleanr)r,r-r.r*r!s r)wrapperzwith_cleanup..wrapper<s$000   > & &t'< = = = 4gt,, ,$    ' &t'< = = =   s 0A )rRequirementCommandrrrrint)r!r3r*s` @r) with_cleanupr63sy *-F*4**** +19=c # Nr+ceZdZdededdffd ZededefdZe d"d e ded e d e d e d edeededefdZe d#ded e dedeed edededededeedeeedfdefdZdeeded e d e deef dZed e ddfdZ d$ded e d eedeede f d!ZxZS)%r4r.kwr"Nctj|i||jt j|jt jdSr0)super__init__cmd_opts add_optionr dependency_groupsr2)r,r.r8 __class__s r)r;zRequirementCommand.__init__Psc$%"%%%   !=!?!?@@@   !4!6!677777r+r-cd|jvrdSdS)zEDetermines which resolver should be used, based on the given options.zlegacy-resolverlegacy resolvelib)deprecated_features_enabledr-s r)determine_resolver_variantz-RequirementCommand.determine_resolver_variantVs  C C C8|r+rtemp_build_dir build_trackersessionfinder use_user_site download_dir verbosityc d|j} | Jd} ||} | dkr&d|jv} | rtdn'd} d} d|jvrtdt | |j||j|j|||j ||j || || |j S) zQ Create a RequirementPreparer instance for the given parameters. NFrBz fast-depszpip is using lazily downloaded wheels using HTTP range requests to obtain dependency information. This experimental feature is enabled through --use-feature=fast-deps and it is not ready for production.Tz;fast-deps has no effect when used with the legacy resolver.) build_dirsrc_dirrKbuild_isolationcheck_build_depsrGrH progress_barrIrequire_hashesrJ lazy_wheelrLlegacy_resolverresume_retries) pathrEfeatures_enabledloggerwarningrrOrPrQrRrSrV) clsrFr-rGrHrIrJrKrLtemp_build_dir_pathrUresolver_variantrTs r)make_requirement_preparerz,RequirementCommand.make_requirement_preparer^s-1"...99'BB | + +$(@@J "#OJg666Q#)O%#3$5' -"1'!+"1    r+FTto-satisfy-onlypreparer wheel_cacheignore_installedignore_requires_pythonforce_reinstallupgrade_strategy use_pep517py_version_info.c dtt|j| } ||} | dkr=ddl}|jjjj |||| ||j |||| |  Sddl }|jjj j |||| ||j |||| |  S)zF Create a Resolver instance for the given parameters. )isolatedrfrBrN) r`rIramake_install_reqrJignore_dependenciesrbrcrdrerg) rr isolated_moderE,pip._internal.resolution.resolvelib.resolver _internal resolutionrBresolverResolverrk(pip._internal.resolution.legacy.resolverrA)r[r`rIr-rarJrbrcrdrerfrgrjr]pips r) make_resolverz RequirementCommand.make_resolvers$# '*!    99'BB | + + ? ? ? ?=+6?HH!'!1+$+$?!1'= /!1 /I    8777}'.7@@#-' ' ;-#9+-+A   r+c g}|jD]E}t|d|||D].}t||jd}||/F|D]E} t | d|j|jdt|dd}||F|jrIt|jD]4} t| |j|jd}||5|j D]D} t| d|j|jt|dd }||E|j D]l}t|||| D]V}t||j|jd|jr|jdnd }||Wmt!d |Drd|_|s|j sy|j sr|jskd |ji} |jrAt)djdit-| d|jt)djdi| |S)zS Parse command-line arguments into the corresponding requirements. T) constraintrIr-rHF)ri user_suppliedNconfig_settings) comes_fromrirfrwrx)rirfrw)rwrirfrx)rIr-rH)rirfrwrxc3$K|] }|jV dSr0)has_hash_options).0reqs r) z6RequirementCommand.get_requirements..s%<<s#<<<<<rr editablesr requirementsr-getanyrSr find_linksr formatdictjoin) r,r.r-rIrHrfilename parsed_req req_to_addr}optss r)get_requirementsz#RequirementCommand.get_requirementss^24 + 0 0H0  0 0 A$2"' ##J//// 0 , ,C. ."-" '1BD I I J    + + + +  $ 0.w/HII 0 08$2&1"&  ##J////$ , ,C2" ."- '1BD I I J    + + + + , 0 0H0' 0 0 A$2&1"&&-" *../@AAA!    ##J//// 0" <<|<<< < < *%)G "    # (   DI&D! "E>>Dt388G4F+G+GHHH#5..4==7;== r+cx|j}|}|rt|dSdS)zE Trace basic information about the provided objects. N) search_scopeget_formatted_locationsrYinfo)rIr locationss r)trace_basic_infoz#RequirementCommand.trace_basic_info6sG *  88::  # KK " " " " " # #r+ target_pythonctj||}td|j|j|j|}t j|||S)z Create a package finder appropriate to this requirement command. :param ignore_requires_python: Whether to ignore incompatible "Requires-Python" values in links. Defaults to False. rDT) allow_yankedformat_controlallow_all_prereleases prefer_binaryrc)link_collectorselection_prefsr)rcreaterrprerr)r,r-rHrrcrrs r)_build_package_finderz(RequirementCommand._build_package_finderAsi'-gwGGG."1")+!/#9    #)+'    r+)Nr)NFTFFr_NN)NN)__name__ __module__ __qualname__rr; staticmethodrstrrE classmethodrrrrboolrr5rr^r rrrtrrrrrr __classcell__)r?s@r)r4r4Os8c88888888 Fs\'+5 5 %5 5 $ 5  5  5 5 sm5 5  5 5 5 [5 n -1#!%', % 1%)598 8 %8 8  8 j) 8  8 8 !%8 8 8 TN8 "%S/28  8 8 8 [8 tc3icc c  c  ! ccccJ##4###\#1515      -  !)           r+r4)=__doc__logging functoolsroptparsertypingrrrrpip._internal.cacher pip._internal.clir pip._internal.cli.index_commandr r pip._internal.exceptionsr rpip._internal.index.collectorr"pip._internal.index.package_finderr$pip._internal.models.selection_prefsr"pip._internal.models.target_pythonrpip._internal.network.sessionr,pip._internal.operations.build.build_trackerr pip._internal.operations.preparerpip._internal.req.constructorsrrrr&pip._internal.req.req_dependency_grouprpip._internal.req.req_filerpip._internal.req.req_installrpip._internal.resolution.baserpip._internal.utils.temp_dirrrr getLoggerrrY BUILD_ENVEPHEM_WHEEL_CACHE REQ_BUILDr&r6r4rr+r)rs------------******((((((======VVVVVVHHHHHHHH777777<<<<<<EEEEEE;;;;;;444444EEEEEE@@@@@@ KJJJJJ999999<<<<<<666666  8 $ $#ss8L L L L L *L L L L L r+