Bu_c@@sddlmZddlZddlZddlZddlZddlZddlZddlZddlm Z ddl m Z ddl m Z ddlmZddlmZddlmZdd lmZdd lmZmZdd lmZmZdd lmZmZdd lm Z ddl!m"Z"ddl#m$Z$ddl%m&Z&ddl'm(Z(ddl)m*Z*ddl+m,Z,ddl-m.Z.m/Z/m0Z0m1Z1m2Z2ddl3m4Z4ddl5m6Z6ddl7m8Z8ddl9m:Z:m;Z;e6riddl m<Z<ddl=m>Z>m?Z?m@Z@ddlAmBZBddl!mCZCddlDmEZEddl9mFZFnejGeHZIdZJd efd!YZKeLeMeMeLeMd"ZNd#ZOeMeMeMeLd$ZPd%ZQd&ZRdS('i(tabsolute_importN(tpath(t SUPPRESS_HELP(t pkg_resources(tcanonicalize_name(t WheelCache(t cmdoptions(tmake_target_python(tRequirementCommandt with_cleanup(tERRORtSUCCESS(t CommandErrortInstallationError(tdistutils_scheme(tcheck_install_conflicts(tinstall_given_reqs(tget_requirement_tracker(ttoday_is_later_than(tparse_distutils_args(ttest_writable_dir(t ensure_dirtget_installed_versiontget_pip_versiont(protect_pip_from_modification_on_windowst write_output(t TempDirectory(tMYPY_CHECK_RUNNING(tvirtualenv_no_global(tbuildt should_build_for_install_command(tValues(tIterabletListtOptional(t FormatControl(tConflictDetails(tInstallRequirement(tBinaryAllowedPredicatec@sfd}|S(Nc@s5|jr tSt|j}j|}d|kS(Ntbinary(t use_pep517tTrueRtnametget_allowed_formats(treqtcanonical_nametallowed_formats(tformat_control(sO/opt/alt/python36/lib/python3.6/site-packages/pip/_internal/commands/install.pytcheck_binary_allowed8s  ((R/R0((R/sO/opt/alt/python36/lib/python3.6/site-packages/pip/_internal/commands/install.pytget_check_binary_allowed6stInstallCommandcB@sGeZdZdZdZedZdZdZdZ RS(sI Install packages from: - PyPI (and other indexes) using requirement specifiers. - VCS project urls. - Local project directories. - Local or remote source archives. pip also supports installing from "requirements files", which provide an easy way to specify a whole environment to be installed. s% %prog [options] [package-index-options] ... %prog [options] -r [package-index-options] ... %prog [options] [-e] ... %prog [options] [-e] ... %prog [options] ...c C@s|jjtj|jjtj|jjtj|jjtj|jjtj|jjdddddddddd tj |j|jjd dd d d dd|jjddd d ddt |jjddddddddd|jjddddddddd|jjtj |jjtj |jjddddd d dd|jjddddddddgdd |jjd!dd"d d dd#|jjd$d%dd&d d dd'|jjtj |jjtj|jjtj|jjtj|jjtj|jjtj|jjd(d d dd)dtdd*|jjd+d ddd)dd,|jjd-d ddd.dtdd/|jjd0d ddd1dtdd2|jjtj|jjtj|jjtj|jjtj|jjtjtjtj|j}|jjd3||jjd3|jdS(4Ns-ts--targettdestt target_dirtmetavartdirtdefaultthelpsInstall packages into . By default this will not replace existing files/folders in . Use --upgrade to replace existing packages in with new versions.s--usert use_user_sitetactiont store_truesInstall to the Python user install directory for your platform. Typically ~/.local/, or %APPDATA%\Python on Windows. (See the Python documentation for site.USER_BASE for full details.)s --no-usert store_falses--roott root_paths=Install everything relative to this alternate root directory.s--prefixt prefix_pathsIInstallation prefix where lib, bin and other top-level folders are placeds-Us --upgradetupgradesUpgrade all specified packages to the newest available version. The handling of dependencies depends on the upgrade-strategy used.s--upgrade-strategytupgrade_strategysonly-if-neededtchoicesteagersGDetermines how dependency upgrading should be handled [default: %default]. "eager" - dependencies are upgraded regardless of whether the currently installed version satisfies the requirements of the upgraded package(s). "only-if-needed" - are upgraded only when they do not satisfy the requirements of the upgraded package(s).s--force-reinstalltforce_reinstalls;Reinstall all packages even if they are already up-to-date.s-Is--ignore-installedtignore_installedsIgnore the installed packages, overwriting them. This can break your system if the existing package is of a different version or was installed with a different package manager!s --compiletcompiles'Compile Python source files to bytecodes --no-compiles.Do not compile Python source files to bytecodes--no-warn-script-locationtwarn_script_locations0Do not warn when installing scripts outside PATHs--no-warn-conflictstwarn_about_conflictss%Do not warn about broken dependenciesi(tcmd_optst add_optionRt requirementst constraintstno_depstpreteditabletNonetadd_target_python_optionsRt build_dirtsrctignore_requires_pythontno_build_isolationR(t no_use_pep517tinstall_optionstglobal_optionsR)t no_binaryt only_binaryt prefer_binarytrequire_hashest progress_bartmake_option_groupt index_grouptparsertinsert_option_group(tselft index_opts((sO/opt/alt/python36/lib/python3.6/site-packages/pip/_internal/commands/install.pyt add_optionsWs                  c,C@s|jr'|jdk r'tdntj|d}tjdkr| r|j rt j t j d}|dkrt j t j d}ntjd|nd}|jr|j}ntj|dt|jpg}tjd tt|jd |jd |jd |jd |j|_d}d}|jrt|_tj j|j|_tj j|jrtj j|j rtdntdd}|j }|j|n|j pg} |j!|} t"|} |j#d|d| d| d|j$} |j%p0|j& } t'|j(|j)}|jt*}t|j&d| dddt}y|j+||| | }t,||j|j-d|d|d|d| d| d|j}|j.d|d| d|d|d|jd|jd|j$d|j/d |d!|j0 }|j1| |j2|d"|j }y|j3d#}Wnt4k rt5}nX|j6dk}t7d$|t8| j)}g|j9j:D]}t;||r|^q}t<|d|d%gd&g\}}g|D]}|j0r |j=^q }|rPt>d'j?d(j@|nx#|D]}|j0sWd)|_AqWqWW|jB|}d}|jC o|jD}|r|jE|}n|jF} |jrt5} ntG||| d*|jd+|d,|jd-| d|jd.|jH}!tId/|jd+|d*|jd,|jd0|j}"tJjK|"}#|!jLd1tMjNd2g}$xh|!D]`}%|%j=}&y0tO|%j=d3|#}'|'r|&d4|'7}&nWntPk rnX|$jQ|&q{W|dk r |jR|d5d6|jSknd7j@|$}(|(r/tTd8|(nWnKtUk r}})|jVd9k}*tW|)|*|j}+tjX|+d:|*tYSX|jr|stZ|j[|j||jnt\S(;Ns'Can not combine '--user' and '--target'cS@s.ttdp-ttdo-tjtjkS(Nt real_prefixt base_prefix(thasattrtsysRetprefix(((sO/opt/alt/python36/lib/python3.6/site-packages/pip/_internal/commands/install.pytis_venvsis __main__.pys -m pipsgRunning pip install with root privileges is generally not a good idea. Try `%s install --user` instead.sto-satisfy-onlyt check_targetsUsing %sR>R4R=t isolated_modes=Target path exists but is not a directory, will not continue.tkindttargettoptionstsessiont target_pythonRStdeletetinstalltglobally_managedttemp_build_dirt req_trackertfinderR9tpreparert wheel_cacheRDRCR@R(tcheck_supported_wheelstpipt modifying_pipt build_optionsRWsPCould not build wheels for {} which use PEP 517 and cannot be installed directlys, i trootthomeRhRFt pycompiletusertisolatedtkeyR*t working_sett-t new_resolvers 2020-resolvert sSuccessfully installed %sitexc_info(]R9R4ROR Rtcheck_install_build_globaltostgetuidR=RtbasenameRgtargvt executabletloggertwarningR?R@tcheck_dist_restrictionR)RVtdebugRtdecide_user_installR>RkRDtabspathtexiststisdirRt enter_contextRWtget_default_sessionRt_build_package_finderRStno_cleanRQRt cache_dirR/Rtget_requirementst'reject_location_related_install_optionstmake_requirement_preparert make_resolverRCR(ttrace_basic_infotresolvetget_requirementtKeyErrortFalset satisfied_byRR1RJtvaluesRRR*R tformattjointlegacy_install_reasontget_installation_ordertignore_dependenciesRGt_determine_conflictsRFRREtget_lib_location_guessesRt WorkingSettsorttoperatort attrgetterRt Exceptiontappendt_warn_about_conflictstfeatures_enabledRtEnvironmentErrort verbositytcreate_env_error_messageterrorR tAssertionErrort_handle_target_dirR (,RaRntargsRitcommandR@RVttarget_temp_dirttarget_temp_dir_pathRWRoRpRvt build_deleteRxRut directorytreqsRwtresolvertrequirement_settpip_reqR{R0trt reqs_to_buildt_tbuild_failurestpep517_build_failure_namest to_installt conflictstshould_warn_about_conflictsRFt installedt lib_locationsRtitemstresulttitemtinstalled_versiontinstalled_descRtshow_tracebacktmessage((sO/opt/alt/python36/lib/python3.6/site-packages/pip/_internal/commands/install.pytruns@  &                              "                      c @st|g}tdd|j}|d}|d}|d}tjj|re|j|ntjj|r||kr|j|ntjj|r|j|nx.|D]&} xtj| D] } | |kr"tjj|| tfd|d Dr"qq"ntjj|| } tjj| r|set j d| qntjj | rt j d | qntjj | rt j| qtj| nt jtjj| | | qWqWdS( NtR~tpurelibtplatlibtdatac3@s|]}|jVqdS(N(t startswith(t.0ts(tddir(sO/opt/alt/python36/lib/python3.6/site-packages/pip/_internal/commands/install.pys sisKTarget directory %s already exists. Specify --upgrade to force replacement.sTarget directory %s already exists and is a link. pip will not automatically replace links, please remove if replacement is desired.(RRRRRRtlistdirRtanyRRtislinkRtshutiltrmtreetremovetmove( RaR4RR?t lib_dir_listtschemet purelib_dirt platlib_dirtdata_dirtlib_dirRttarget_item_dir((RsO/opt/alt/python36/lib/python3.6/site-packages/pip/_internal/commands/install.pyRsH        cC@s4yt|SWntk r/tjddSXdS(NswError while checking for conflicts. Please file an issue on pip's issue tracker: https://github.com/pypa/pip/issues/new(RRRt exceptionRO(RaR((sO/opt/alt/python36/lib/python3.6/site-packages/pip/_internal/commands/install.pyRs  cC@s|\}\}}| r$| r$dSg}|sM|jd|jdnGtdddddds|jd d }|jd j|nx`|D]X}||d } xA||D]5} d jd|d| d| d} |j| qWqWxq|D]i}||d } xR||D]F\} } }djd|d| d|d| d| } |j| qWqWtjdj|dS(NsAfter October 2020 you may experience errors when installing or updating packages. This is because pip will change the way that it resolves dependency conflicts. s|We recommend you use --use-feature=2020-resolver to test your packages with the new resolver before it becomes the default. tyearitmonthitdayisPip will install or upgrade your package(s) and its dependencies without taking into account other packages you already have installed. This may cause an uncaught dependency conflict. s#https://forms.gle/cWKMoDs8sUVE29hz9sXIf you would like pip to take your other packages into account, please tell us here: {} is@{name} {version} requires {requirement}, which is not installed.R*tversiont requirementish{name} {version} requires {requirement}, but you'll have {dep_name} {dep_version} which is incompatible.tdep_namet dep_versions (RRRRtcriticalR(Ratconflict_detailsRt package_settmissingt conflictingtpartst form_linkt project_nameRt dependencyRRRR,((sO/opt/alt/python36/lib/python3.6/site-packages/pip/_internal/commands/install.pyR#sF        ( t__name__t __module__t__doc__tusageRcR RRRR(((sO/opt/alt/python36/lib/python3.6/site-packages/pip/_internal/commands/install.pyR2Cs   8 c C@s<tdd|d|d|d|d|}|d|dgS( NRRR~R}RRhRR(R(RR~R}RRhR((sO/opt/alt/python36/lib/python3.6/site-packages/pip/_internal/commands/install.pyRcscC@s)tdttd|d|DS(Ncs@s|]}t|VqdS(N(R(Rtd((sO/opt/alt/python36/lib/python3.6/site-packages/pip/_internal/commands/install.pys ssR}R(talltsetR(R}R((sO/opt/alt/python36/lib/python3.6/site-packages/pip/_internal/commands/install.pytsite_packages_writableps cC@s|d k r$| r$tjdtS|rh|r?tdntrWtdntjdtS|d kszt|s|rtjdtSt j stjdtSt d|d|rtjd tStj d tS( sZDetermine whether to do a user install based on the input options. If use_user_site is False, no additional checks are done. If use_user_site is True, it is checked for compatibility with other options. If use_user_site is None, the default behaviour depends on the environment, which is provided by the other arguments. s$Non-user install by explicit requestsVCan not combine '--user' and '--prefix' as they imply different installation locationssZCan not perform a '--user' install. User site-packages are not visible in this virtualenv.s User install by explicit requests3Non-user install due to --prefix or --target options4Non-user install because user site-packages disabledR}Rs0Non-user install because site-packages writeablesMDefaulting to user installation because normal site-packages is not writeableN( RORRRR RR R)RtsitetENABLE_USER_SITERtinfo(R9R>R4R=Rk((sO/opt/alt/python36/lib/python3.6/site-packages/pip/_internal/commands/install.pyRxs0           cC@sd}g}xQ|D]I}|j}t|}|r|jdj||j|qqW|rt|}|r|jdj||jqn|sdStdjdj|dS(sIf any location-changing --install-option arguments were passed for requirements or on the command-line, then show a deprecation warning. cS@s,g|D]!}dj|jdd^qS(Ns--{}RR(Rtreplace(t option_namesR*((sO/opt/alt/python36/lib/python3.6/site-packages/pip/_internal/commands/install.pytformat_optionsss {!r} from {}s{!r} from command lineNsLocation-changing options found in --install-option: {}. This is unsupported, use pip-level options like --user, --prefix, --root, and --target instead.s; (RVRRRtkeysR R(RJRnR t offendersRRVtlocation_options((sO/opt/alt/python36/lib/python3.6/site-packages/pip/_internal/commands/install.pyRs(      cC@sg}|jd|s<|jd|jt|n |jd|dcd7<|jtjkrd}d}|s|j|d|jgn |j||jd nd j|jdS( s{Format an error message for an EnvironmentError It may occur anytime during the execution of the install command. s5Could not install packages due to an EnvironmentErrors: t.is s"Consider using the `--user` optionsCheck the permissionss or s. R(RtstrterrnotEACCEStextendtlowerRtstrip(RRtusing_user_siteRtuser_option_parttpermissions_part((sO/opt/alt/python36/lib/python3.6/site-packages/pip/_internal/commands/install.pyRs"    (St __future__RRtloggingRRRRRgRtoptparseRt pip._vendorRtpip._vendor.packaging.utilsRtpip._internal.cacheRtpip._internal.cliRtpip._internal.cli.cmdoptionsRtpip._internal.cli.req_commandRR tpip._internal.cli.status_codesR R tpip._internal.exceptionsR R tpip._internal.locationsRtpip._internal.operations.checkRtpip._internal.reqRtpip._internal.req.req_trackerRtpip._internal.utils.datetimeRt"pip._internal.utils.distutils_argsRtpip._internal.utils.filesystemRtpip._internal.utils.miscRRRRRtpip._internal.utils.temp_dirRtpip._internal.utils.typingRtpip._internal.utils.virtualenvRtpip._internal.wheel_builderRRRttypingR R!R"t#pip._internal.models.format_controlR#R$tpip._internal.req.req_installR%R&t getLoggerRRR1R2RRORRRRR(((sO/opt/alt/python36/lib/python3.6/site-packages/pip/_internal/commands/install.pytsj       ( #   7 *