o ai @sddlZddlZddlmZmZmZmZmZddlm Z ddl m Z ddl m Z ddlmZgdZeeZGd d d Zd ee d eeee ffd dZd ee deedeedeedeedeedededed eefddZdS)N)IteratorListOptionalSequenceTuple) indent_log)parse_requirements)InstallRequirement)RequirementSet)r r r install_given_reqsc@s,eZdZdeddfddZdefddZdS)InstallationResultnamereturnNcCs ||_dS)Nr)selfrr/builddir/build/BUILDROOT/alt-python310-pip-21.3.1-5.el8.x86_64/opt/alt/python310/lib/python3.10/site-packages/pip/_internal/req/__init__.py__init__s zInstallationResult.__init__cCsd|jdS)NzInstallationResult(name=)r)rrrr__repr__szInstallationResult.__repr__)__name__ __module__ __qualname__strrrrrrrr sr requirementsrccs0|D]}|jsJd||j|fVqdS)Nz%invalid to-be-installed requirement: r)rreqrrr_validate_requirementss rinstall_optionsglobal_optionsroothomeprefixwarn_script_location use_user_site pycompilec  Cstt|} | rtdd| g} th| D]Z\} } | j rEtd| t| j dd} Wdn1s?wYnd} z| j ||||||||dWnt yg| rf| j sf| w| rq| j rq| | t| qWd| S1swY| S)zu Install everything in the given list. (to be called after having downloaded and unpacked the packages) z!Installing collected packages: %sz, zAttempting uninstall: %sT) auto_confirmN)r r!r"r#r$r%) collections OrderedDictrloggerinfojoinkeysritemsshould_reinstall uninstallinstall Exceptioninstall_succeededrollbackcommitappendr )rrrr r!r"r#r$r% to_install installedreq_name requirementuninstalled_pathsetrrrr %sP     r )r'loggingtypingrrrrrpip._internal.utils.loggingrreq_filer req_installr req_setr __all__ getLoggerrr)r rrboolr rrrrsH