Your IP : 216.73.216.245
�
�Rec@sdZddlZddlZddlZddlZddlmZddlmZddl m
Z
ddlmZm
Z
mZmZmZmZmZddlmZddlmZdd lmZdd
lmZmZmZmZddlmZddl m!Z!dd
l"m#Z#ddl$m%Z%e!rtddl&m'Z'm(Z(m)Z)m*Z*ddl+m,Z,ddlm-Z-ddl.m/Z/ddl0m1Z1ddl2m3Z3ddl4m5Z5ddl6m7Z7ddlm8Z8ere,die'e9e(e9ge(e9fd6e:d6de;�Z<qte,die'e9e9gdfd6e'e9e(e9ge(e9fd6e:d6e:d6de;�Z<nej>e?�Z@d�ZAd�ZBd eCfd!��YZDddd"�ZEd#�ZFd$�ZGddd%�ZHddd&�ZId'�ZJd(�ZKd)eCfd*��YZLdS(+s)Prepares a distribution for installation
i����N(tPY2(t)make_distribution_for_install_requirement(tInstalledDistribution(tDirectoryUrlHashUnsupportedtHashMismatchtHashUnpinnedtInstallationErrortNetworkConnectionErrortPreviousBuildDirErrortVcsHashUnsupported(tcopy2_fixed(t
MissingHashes(t
indent_log(tdisplay_paththide_urltpath_to_displaytrmtree(t
TempDirectory(tMYPY_CHECK_RUNNING(tunpack_file(tvcs(tCallabletListtOptionaltTuple(t TypedDict(tAbstractDistribution(t
PackageFinder(tLink(t
Downloader(tInstallRequirement(tRequirementTracker(tHashestCopytreeKwargstignoretsymlinksttotalt
copy_functiontignore_dangling_symlinkscCs6t|�}|j|��|j||�WdQX|S(s-Prepare a distribution for installation.
N(Rttracktprepare_distribution_metadata(treqtreq_trackertfindertbuild_isolationt
abstract_dist((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/operations/prepare.pyt_get_prepared_distributionPs cCsDtj|j�}|dk s$t�|j|dt|j��dS(Nturl(Rtget_backend_for_schemetschemetNonetAssertionErrortunpackRR/(tlinktlocationtvcs_backend((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/operations/prepare.pytunpack_vcs_link_stFilecBseZd�ZRS(cCs||_||_dS(N(tpathtcontent_type(tselfR:R;((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/operations/prepare.pyt__init__gs (t__name__t
__module__R=(((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/operations/prepare.pyR9fscCs�tdddt�}d}|r6t|||�}n|rX|}tj|�d}nt|||j|�\}}t||�S(NtkindR4tglobally_managedi( RtTrueR2t_check_download_dirt mimetypest
guess_typet_download_http_urlR:R9(R5t
downloadertdownload_dirthashesttemp_dirtalready_downloaded_patht from_pathR;((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/operations/prepare.pytget_http_urlmscCsVyt||�Wn>tjk
rQ}tjdt|�t|�t|��nXdS(s�Copying special files is not supported, but as a convenience to users
we skip errors copying them. This supports tools that may create e.g.
socket files in the project source directory.
s>Ignoring special file error '%s' encountered copying %s to %s.N(R
tshutiltSpecialFileErrortloggertwarningtstrR(tsrctdestte((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/operations/prepare.pyt_copy2_ignoring_special_files�s cs�tjj|�}tjj|��tjj|�����fd�}td|dt�}tsst|d<nt j
�||�dS(NcsQg}|�kr%|ddg7}ntjj|��krM|�g7}n|S(Ns.toxs.nox(tosR:tabspath(tdtnamestskipped(tsourcettarget_basenamettarget_dirname(s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/operations/prepare.pyR"�sR"R#R%(RWR:RXtbasenametdirnametdictRBRRVRNtcopytree(R\ttargetttarget_abspathR"tkwargs((R\R]R^s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/operations/prepare.pyt_copy_source_tree�s
cCsod}|r!t|||�}n|r0|}n |j}|rO|j|�ntj|�d}t||�S(s,Get file and optionally check its hash.
iN(R2RCt file_pathtcheck_against_pathRDRER9(R5RHRIRKRLR;((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/operations/prepare.pytget_file_url�s cCs�|jrt||�dS|j�rYtjj|�rEt|�nt|j |�dS|j
rzt||d|�}nt|||d|�}|j
s�t|j||j�n|S(s_Unpack link into location, downloading if required.
:param hashes: A Hashes object, one of whose embedded hashes must match,
or HashMismatch will be raised. If the Hashes is empty, no matches are
required, and unhashable types of requirements (like VCS ones, which
would ordinarily raise HashUnsupported) are allowed.
RIN(tis_vcsR8R2tis_existing_dirRWR:tisdirRRfRgtis_fileRiRMtis_wheelRR;(R5R6RGRHRItfile((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/operations/prepare.pyt
unpack_url�s$
cCs�||�}tjj||j�}t|d��(}x|jD]}|j|�q@WWdQX|rs|j|�n||jj j
dd�fS(s6Download link url into temp_dir using provided sessiontwbNscontent-typet(RWR:tjointfilenametopentchunkstwriteRhtresponsetheaderstget(R5RGRJRItdownloadRgtcontent_filetchunk((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/operations/prepare.pyRFscCs�tjj||j�}tjj|�s.dStjd|�|r�y|j|�Wq�t k
r�tj
d|�tj|�dSXn|S(s� Check download_dir for previously downloaded file with correct hash
If a correct file is found return its path else None
sFile was already downloaded %ss;Previously-downloaded file %s has bad hash. Re-downloading.N(RWR:RsRttexistsR2RPtinfoRhRRQtunlink(R5RHRIt
download_path((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/operations/prepare.pyRC#s
tRequirementPreparercBs_eZdZd�Zed��Zd�Zd�Zd�Ze d�Z
d�Zd�ZRS( sPrepares a Requirement
cCsqtt|�j�||_||_||_||_||_||_||_ ||_
| |_|
|_dS(N(
tsuperR�R=tsrc_dirt build_dirR*RGR+RHtwheel_download_dirR,trequire_hashest
use_user_site(R<R�RHR�R�R,R*RGR+R�R�((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/operations/prepare.pyR=As cCsO|js
tStjj|j�r&tStjd�tdj |j���dS(Ns!Could not find download directorys0Could not find or access download directory '{}'(
RHtFalseRWR:R~RBRPtcriticalRtformat(R<((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/operations/prepare.pyt_download_should_savens
cCsN|jjr1|jj}tjdt|��ntjd|jpF|�dS(sLog the way the link prepared.s
Processing %ss
Collecting %sN(R5RmRgRPRR
R)(R<R)R:((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/operations/prepare.pyt_log_preparing_link|scCs�|jjrdS|jdks%t�|j|jdtd|�tj j
tj j|jd��r�tdj
||j���ndS(s1Ensure source_dir of a linked InstallRequirement.Nt
autodeletetparallel_buildsssetup.pys�pip can't proceed with requirements '{}' due to apre-existing build directory ({}). This is likely due to a previous installation that failed . pip is being responsible and not assuming it can delete this. Please delete it and try again.(R5Rnt
source_dirR2R3tensure_has_source_dirR�RBRWR:R~RsRR�(R<R)RHR�((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/operations/prepare.pyt_ensure_link_req_src_dir�s $cCs�|js|jdt�S|jjr1t��n|jj�rLt��n|jdkrq|j
rqt��n|jdt�p�t
�S(Nttrust_internet(R�RIRBR5RjR RkRt
original_linkR2t is_pinnedRR�R(R<R)((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/operations/prepare.pyt_get_linked_req_hashes�s c
Cs�|jst�|j}|j|�|jrC|jrC|j}n |j}t��\|j|||�y.t||j |j
|d|j|��}Wn.tk
r�}t
dj|||���nX|r�|j|_nt||j|j|j�}|r�|j�rtjd�q�|r�tjj||j�}tjj|�s�tj|j|�t|�} tjd| �q�q�n|jr�|j r�|j!|j�q�nWdQX|S(s3Prepare a requirement to be obtained from req.link.RIsDCould not install requirement {} because of HTTP error {} for URL {}s*Link is a directory, ignoring download_dirsSaved %sN("R5R3R�RnR�RHRR�RpR�RGR�RRR�R:tlocal_file_pathR.R*R+R,RkRPRRWRsRtR~RNtcopyR
R�Rjtarchive(
R<R)R�R5RHt
local_filetexcR-tdownload_locationR�((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/operations/prepare.pytprepare_linked_requirement�sD
c Cs�|jstd��tjd|�t���|jrPtdj|���n|j|j �|j
|j�t||j
|j|j�}|jr�|j|j�n|j|j�WdQX|S(s(Prepare an editable requirement
s-cannot prepare a non-editable req as editablesObtaining %ssoThe editable requirement {} cannot be installed when requiring hashes, because there is no single file to hash.N(teditableR3RPRRR�RR�R�R�tupdate_editableR�R.R*R+R,R�RHtcheck_if_existsR�(R<R)R-((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/operations/prepare.pytprepare_editable_requirement�s
cCs�|jstd��|dk s9tdj|j���tjd|||jj�t��*|jrxtj d�nt
|�}WdQX|S(s1Prepare an already-installed requirement
s(req should have been satisfied but isn'tsAdid not get skip reason skipped but req.satisfied_by is set to {}sRequirement %s: %s (%s)s�Since it is already installed, we are trusting this package without checking its hash. To ensure a completely repeatable environment, install into an empty virtualenv.N(tsatisfied_byR3R2R�RPRtversionRR�tdebugR(R<R)tskip_reasonR-((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/operations/prepare.pytprepare_installed_requirements
(
R>R?t__doc__R=tpropertyR�R�R�R�R�R�R�R�(((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/operations/prepare.pyR�=s - !4 (MR�tloggingRDRWRNtpip._vendor.sixRtpip._internal.distributionsRt%pip._internal.distributions.installedRtpip._internal.exceptionsRRRRRRR tpip._internal.utils.filesystemR
tpip._internal.utils.hashesRtpip._internal.utils.loggingRtpip._internal.utils.miscR
RRRtpip._internal.utils.temp_dirRtpip._internal.utils.typingRtpip._internal.utils.unpackingRtpip._internal.vcsRttypingRRRRtmypy_extensionsRRt"pip._internal.index.package_finderRtpip._internal.models.linkRtpip._internal.network.downloadRtpip._internal.req.req_installRtpip._internal.req.req_trackerRR RRtboolR�R!R2t getLoggerR>RPR.R8tobjectR9RMRVRfRiRpRFRCR�(((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/operations/prepare.pyt<module>sp4 ""
""+
?>