Warning: session_start(): Session cannot be started after headers have already been sent in /home/tvrreohg/public_html/manga.php on line 13
3 ÝPfˆã@s~ddlmZddlmZddlmZddlZddlZddlm Z ddlm Z ddl m Z ddl mZmZmZmZmZdd lmZmZmZmZmZmZmZmZmZmZdd lmZdd l m!Z!m"Z"m#Z#m$Z$m%Z%dd l&m'Z'dd l(m)Z)ddl*m+Z+ddl,m-Z-ddl.m/Z/ej0e1ƒZ2Gdd„de3ƒZ4Gdd„de3ƒZ5dd„Z6Gdd„de5ƒZ7Gdd„de5ƒZ8Gdd„de5ƒZ9Gdd„de3ƒZ:dS)é)Úabsolute_import)Ú defaultdict)ÚchainN)Ú pkg_resources)Úrequests)Ú expanduser)Ú is_file_urlÚ is_dir_urlÚ is_vcs_urlÚ url_to_pathÚ unpack_url) ÚInstallationErrorÚBestVersionAlreadyInstalledÚDistributionNotFoundÚPreviousBuildDirErrorÚ HashErrorÚ HashErrorsÚ HashUnpinnedÚDirectoryUrlHashUnsupportedÚVcsHashUnsupportedÚUnsupportedPythonVersion)ÚInstallRequirement)Ú display_pathÚdist_in_usersiteÚdist_in_install_pathÚ ensure_dirÚnormalize_path)Ú MissingHashes)Ú indent_log)Úcheck_dist_requires_python)Úvcs)ÚWheelc@sDeZdZdd„Zdd„Zdd„Zdd„Zd d „Zd d „Zd d„Z dS)Ú RequirementscCsg|_i|_dS)N)Ú_keysÚ_dict)Úself©r&ú/usr/lib/python3.6/req_set.pyÚ__init__"szRequirements.__init__cCs|jS)N)r#)r%r&r&r'Úkeys&szRequirements.keyscs‡fdd„ˆjDƒS)Ncsg|]}ˆj|‘qSr&)r$)Ú.0Úkey)r%r&r'ú *sz'Requirements.values..)r#)r%r&)r%r'Úvalues)szRequirements.valuescCs ||jkS)N)r#)r%Úitemr&r&r'Ú __contains__,szRequirements.__contains__cCs$||jkr|jj|ƒ||j|<dS)N)r#Úappendr$)r%r+Úvaluer&r&r'Ú __setitem__/s  zRequirements.__setitem__cCs |j|S)N)r$)r%r+r&r&r'Ú __getitem__4szRequirements.__getitem__cs$‡fdd„ˆjƒDƒ}ddj|ƒS)Ncs$g|]}dt|ƒtˆ|ƒf‘qS)z%s: %s)Úrepr)r*Úk)r%r&r'r,8sz)Requirements.__repr__..zRequirements({%s})z, )r)Újoin)r%r-r&)r%r'Ú__repr__7szRequirements.__repr__N) Ú__name__Ú __module__Ú __qualname__r(r)r-r/r2r3r7r&r&r&r'r" sr"c@s(eZdZdZdd„Zdd„Zdd„ZdS) ÚDistAbstractionatAbstracts out the wheel vs non-wheel prepare_files logic. The requirements for anything installable are as follows: - we must be able to determine the requirement name (or we can't correctly handle the non-upgrade case). - we must be able to generate a list of run-time dependencies without installing any additional packages (or we would have to either burn time by doing temporary isolated installs or alternatively violate pips 'don't start installing unless all requirements are available' rule - neither of which are desirable). - for packages with setup requirements, we must also be able to determine their requirements without installing additional packages (for the same reason as run-time dependencies) - we must be able to create a Distribution object exposing the above metadata. cCs ||_dS)N)Úreq_to_install)r%r<r&r&r'r(OszDistAbstraction.__init__cCst|jƒ‚dS)z Return a setuptools Dist object.N)ÚNotImplementedErrorÚdist)r%Úfinderr&r&r'r>RszDistAbstraction.distcCst|jƒ‚dS)z3Ensure that we can get a Dist for this requirement.N)r=r>)r%r&r&r'Ú prep_for_distVszDistAbstraction.prep_for_distN)r8r9r:Ú__doc__r(r>r@r&r&r&r'r;<sr;cCs0|jrt|ƒS|jr$|jjr$t|ƒSt|ƒSdS)zãFactory to make an abstract dist object. Preconditions: Either an editable req with a source_dir, or satisfied_by or a wheel link, or a non-editable req with a source_dir. :return: A concrete DistAbstraction. N)ÚeditableÚIsSDistÚlinkÚis_wheelÚIsWheel)r<r&r&r'Úmake_abstract_dist[s rGc@seZdZdd„Zdd„ZdS)rFcCsttj|jjƒƒdS)Nr)ÚlistrZfind_distributionsr<Ú source_dir)r%r?r&r&r'r>msz IsWheel.distcCsdS)Nr&)r%r&r&r'r@qszIsWheel.prep_for_distN)r8r9r:r>r@r&r&r&r'rFksrFc@seZdZdd„Zdd„ZdS)rCcCs(|jjƒ}|jdƒr$|j|jdƒƒ|S)Nzdependency_links.txt)r<Zget_distZ has_metadataZadd_dependency_linksZget_metadata_lines)r%r?r>r&r&r'r>xs    z IsSDist.distcCs|jjƒ|jjƒdS)N)r<Z run_egg_infoZassert_source_matches_version)r%r&r&r'r@�s zIsSDist.prep_for_distN)r8r9r:r>r@r&r&r&r'rCvs rCc@seZdZdd„Zdd„ZdS)Ú InstalledcCs|jjS)N)r<Ú satisfied_by)r%r?r&r&r'r>ˆszInstalled.distcCsdS)Nr&)r%r&r&r'r@‹szInstalled.prep_for_distN)r8r9r:r>r@r&r&r&r'rJ†srJc@s eZdZd$dd„Zdd„Zdd „Zd%d d „Zd d „Zedd„ƒZ edd„ƒZ dd„Z d&dd„Z dd„Z dd„Zdd„Zd'dd„Zdd„Zd d!„Zffd"d#„ZdS)(ÚRequirementSetFNTcCs¼| dkrtdƒ‚||_||_||_||_||_||_| |_tƒ|_ i|_ g|_ | |_ ||_ g|_g|_g|_||_| |_||_| |_| |_||_|rœt|ƒ}||_||_||_ttƒ|_dS)a3Create a RequirementSet. :param wheel_download_dir: Where still-packed .whl files should be written to. If None they are written to the download_dir parameter. Separate to download_dir to permit only keeping wheel archives for pip wheel. :param download_dir: Where still packed archives should be written to. If None they are not saved, and are deleted immediately after unpacking. :param wheel_cache: The pip wheel cache, for passing to InstallRequirement. Nz?RequirementSet() missing 1 required keyword argument: 'session')Ú TypeErrorÚ build_dirÚsrc_dirÚ download_dirÚupgradeÚupgrade_strategyÚignore_installedÚforce_reinstallr"Ú requirementsÚrequirement_aliasesÚunnamed_requirementsÚignore_dependenciesÚignore_requires_pythonÚsuccessfully_downloadedÚsuccessfully_installedÚreqs_to_cleanupÚas_eggÚ use_user_siteÚ target_dirÚsessionÚ pycompileÚisolatedrÚwheel_download_dirÚ _wheel_cacheÚrequire_hashesrrHÚ _dependencies)r%rNrOrPrQrRrSr]r_rXrTr^r`rarbrcÚ wheel_cachererYr&r&r'r(‘s<zRequirementSet.__init__cCs8dd„|jjƒDƒ}|jdd„d�djdd„|DƒƒS)NcSsg|]}|js|‘qSr&)Z comes_from)r*Úreqr&r&r'r,Ìsz*RequirementSet.__str__..cSs |jjƒS)N)ÚnameÚlower)rhr&r&r'ÚÎsz(RequirementSet.__str__..)r+ú cSsg|]}t|jƒ‘qSr&)Ústrrh)r*rhr&r&r'r,Ïs)rUr-Úsortr6)r%Úreqsr&r&r'Ú__str__ËszRequirementSet.__str__cCsNdd„|jjƒDƒ}|jdd„d�djdd„|Dƒƒ}d|jjt|ƒ|fS) NcSsg|]}|‘qSr&r&)r*rhr&r&r'r,Òsz+RequirementSet.__repr__..cSs |jjƒS)N)rirj)rhr&r&r'rkÓsz)RequirementSet.__repr__..)r+z, cSsg|]}t|jƒ‘qSr&)rmrh)r*rhr&r&r'r,Ôsz"<%s object; %d requirement(s): %s>)rUr-rnr6Ú __class__r8Úlen)r%roZreqs_strr&r&r'r7Ñs zRequirementSet.__repr__c Csò|j}|j|ƒs&tjd|j|jƒgS|jrV|jjrVt|jjƒ}|j ƒsVt d|jƒ‚|j |_ |j |_ |j |_ |j|_|dk|_|s–|jj|ƒ|gSy|j|ƒ}Wntk r¼d}YnX|dkoî|oî|j oî|j|jkoî|jj|jjk �rt d|||fƒ‚|�s8||j|<|jƒ|k�r0||j|jƒ<|g}n’g}|j �rÆ|j�rÆ|j�rŠ|j�ol|jj|jjk �rŠ|jj|ƒt d|ƒ‚d|_ttt|jƒj t|jƒƒƒƒ|_tj!d||jƒ|g}|}|�rê|j|ƒ}|j"|j|ƒ|SdS)a'Add install_req as a requirement to install. :param parent_req_name: The name of the requirement that needed this added. The name is used because when multiple unnamed requirements resolve to the same name, we could otherwise end up with dependency links that point outside the Requirements set. parent_req must already be added. Note that None implies that this is a user supplied requirement, vs an inferred one. :param extras_requested: an iterable of extras used to evaluate the environement markers. :return: Additional requirements to scan. That is either [] if the requirement is not applicable, or [install_req] if the requirement is applicable and has just been added. z6Ignoring %s: markers '%s' don't match your environmentz-%s is not a supported wheel on this platform.Nz5Double requirement given: %s (already in %s, name=%r)zhCould not satisfy constraints for '%s': installation from path or url cannot be constrained to a versionFzSetting %s extras to: %s)#riZ match_markersÚloggerÚwarningZmarkersrDrEr!ÚfilenameZ supportedr r]r^r_raÚ is_directrWr0Úget_requirementÚKeyErrorÚ constraintÚextrasrhZ specifierrUrjrVÚpathr\ÚtupleÚsortedÚsetÚunionÚdebugrf) r%Ú install_reqZparent_req_nameÚextras_requestedriZwheelZ existing_reqÚresultZ parent_reqr&r&r'Úadd_requirementØsp             zRequirementSet.add_requirementcCsF|jƒ}||jkr |j|j s>||jkrB|j|j|j rBdSdS)NTF)rjrUryrV)r%Ú project_namerir&r&r'Úhas_requirement4s  zRequirementSet.has_requirementcCstdd„|jjƒDƒƒp|jS)Ncss|]}|js|VqdS)N)ry)r*rhr&r&r'ú ?sz2RequirementSet.has_requirements..)rHrUr-rW)r%r&r&r'Úhas_requirements=szRequirementSet.has_requirementscCsD|jr@t|jƒ|_tjj|jƒr$dStjdƒtdt|jƒƒ‚dS)NTz!Could not find download directoryz0Could not find or access download directory '%s'F) rPrÚosr{ÚexistsrsÚcriticalr r)r%r&r&r'Ú is_downloadBs  zRequirementSet.is_downloadcCsTxB||jƒfD]2}||jkr&|j|S||jkr|j|j|SqWtd|ƒ‚dS)NzNo project with the name %r)rjrUrVrx)r%r…rir&r&r'rwOs    zRequirementSet.get_requirementcCs4x.|jjƒD] }|jrq |j|d�|jƒq WdS)N)Ú auto_confirm)rUr-ryÚ uninstallÚcommit_uninstall)r%r�rhr&r&r'rŽWs  zRequirementSet.uninstallcCsÆ|jrt|jƒ|j|jjƒ}|jp6tdd„|Dƒƒ}|rJ|jrJtdƒ‚g}t ƒ}xdt ||ƒD]V}y|j |j ||||j d�ƒWq`tk r´}z||_|j|ƒWYdd}~Xq`Xq`W|rÂ|‚dS)zY Prepare process. Create temp directories, download and/or unpack files. css|] }|jVqdS)N)Zhas_hash_options)r*rhr&r&r'r‡jsz/RequirementSet.prepare_files..z£--egg is not allowed with --require-hashes mode, since it delegates dependency resolution to setuptools and could thus result in installation of unhashed packages.)rerXN)rcrrWrUr-reÚanyr]r rrÚextendÚ _prepare_filerXrrhr0)r%r?Z root_reqsreZdiscovered_reqsZ hash_errorsrhÚexcr&r&r'Ú prepare_files^s,   zRequirementSet.prepare_filescCs |jo|jdkp|jdko|jS)NZeagerzonly-if-needed)rQrRrv)r%rhr&r&r'Ú_is_upgrade_allowed…s z"RequirementSet._is_upgrade_allowedc CsÂ|jƒ|jrº|j|ƒ}d}|r˜|jp*|jshy|j||ƒWn*tk rTd}Yntk rfYnX|s˜|jr~t |jƒ pˆt |jƒ s’|j|_ d|_|r¢d}n|j dkr²d}nd}|SdSdS)aCheck if req_to_install should be skipped. This will check if the req is installed, and whether we should upgrade or reinstall it, taking into account all the relevant user options. After calling this req_to_install will only have satisfied_by set to None if the req_to_install is to be upgraded/reinstalled etc. Any other value will be a dist recording the current thing installed that satisfies the requirement. Note that for vcs urls and the like we can't assess skipping in this routine - we simply identify that we need to pull the thing down, then later on it is pulled down and introspected to assess upgrade/ reinstalls etc. :return: A text reason for why it was skipped, or None. FTNzalready up-to-datezonly-if-neededz%not upgraded as not directly requiredzalready satisfied) Úcheck_if_existsrKr•rTrDZfind_requirementrrr^rrÚconflicts_withrR)r%r<r?Zupgrade_allowedZbest_installedÚ skip_reasonr&r&r'Ú_check_skip_installedŒs4      z$RequirementSet._check_skip_installedc(sªˆjs ˆjrgSdˆ_ˆjr*tjdˆƒnŠˆjdks8t‚ˆjsJˆjˆ|ƒ}ˆjrx|dk shtdˆjfƒ‚tjd|ˆƒn<ˆj r¨ˆj j dkr¨t ˆj j ƒ}tjdt |ƒƒn tjdˆƒtƒ��äˆj�r |rÖtd ˆƒ‚ˆjˆjƒˆjˆj ƒtˆƒ}|jƒˆj�rˆjˆjƒˆjƒ�n0ˆj�rD|�r8tjd ƒtˆƒ}�n ˆjˆjƒtjjtjjˆj d ƒƒ�r|t!d ˆˆj fƒ‚ˆj"|ˆj#ˆƒ|ƒˆj �sœt‚ˆj }|�rît$|ƒ�rºt%ƒ‚nt&|ƒ�rÔt'|ƒ�rÔt(ƒ‚ˆj) �rîˆj* �rît+ƒ‚ˆj,| d �} |�r| �rt-ƒ} yZˆj} d} ˆj j.�r4ˆj/�r4ˆj/} ˆj j.�rN| �rJd} nd} t0ˆj ˆj | | ˆj1| d�WnHt2j3k �r²} z(tj4dˆ| ƒtdˆ| ˆj fƒ‚WYdd} ~ XnXtˆƒ}|jƒˆj�rèˆj j t5j6k�rèˆjˆjƒˆj�søˆjƒˆj�rPˆj7�sˆj�rDˆj8�r&t9ˆjƒ �p0t:ˆjƒ �s<ˆjˆ_;dˆ_n tjdˆƒ|j<|ƒ} y t=| ƒWnHt>k �r®}z*ˆj?�r”tj@|jAdƒn ˆjBƒ‚WYdd}~XnXg‰‡‡‡fdd„}ˆjCˆjDƒ�sÞˆjEˆdƒ|�spˆjF�rtjddjˆjFƒƒtGtHˆjFƒtH| jFƒƒ}x|D]}tj@d| |ƒ�qWtGtH| jFƒtHˆjFƒ@ƒ}x | jI|ƒD]}|||d��qZWˆjJjKˆƒˆj �rœˆj �rœˆjLjKˆƒWdQRXˆS)zxPrepare a single requirements file. :return: A list of additional InstallRequirements to also install. Tz Obtaining %sNzP_check_skip_installed returned None but req_to_install.satisfied_by is set to %rzRequirement %s: %sÚfilez Processing %sz Collecting %szoThe editable requirement %s cannot be installed when requiring hashes, because there is no single file to hash.z§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.zsetup.pyzípip can't proceed with requirements '%s' due to a pre-existing build directory (%s). 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.)Ztrust_internetF)r`Úhashesz4Could not install requirement %s because of error %szDCould not install requirement %s because of HTTP error %s for URL %sz.add_reqz!Installing extra requirements: %rú,z"%s does not provide the extra '%s')r‚)MryZpreparedrBrsÚinforKÚAssertionErrorrSr™rDÚschemer Zurlrrr Zensure_has_source_dirrOZupdate_editablerŒrGr@ÚarchiverPr–r€rJrNr‰r{rŠr6rIrZ populate_linkr•r rrr rZ original_linkZ is_pinnedrr›rrErcr r`rZ HTTPErrorr‹r Z all_schemesrQr^rrr—r>rrrYrtÚargsÚremove_temporary_sourcer†rir„rzr}r~Zrequiresr\r0rZ)r%r?r<rerXr˜r{Z abstract_distrDr›rPZautodelete_unpackedr“r>ÚeržZmissing_requestedZmissingZavailable_requestedrœr&)r�r<r%r'r’Îs                    "        zRequirementSet._prepare_filec Cs8tjdƒtƒ�x|jD] }|jƒqWWdQRXdS)zClean up files, remove builds.zCleaning up...N)rsr€rr\r¥)r%rhr&r&r'Ú cleanup_filesÙs  zRequirementSet.cleanup_filescs<g‰tƒ‰‡‡‡‡fdd„‰xˆjjƒD] }ˆ|ƒq(WˆS)zäCreate the installation order. The installation order is topological - requirements are installed before the requiring thing. We break cycles at an arbitrary point, and make no other guarantees. csP|js|ˆkrdS|jrdSˆj|ƒxˆj|D] }ˆ|ƒq2Wˆj|ƒdS)N)rKryÚaddrfr0)rhZdep)ÚorderÚ ordered_reqsÚscheduler%r&r'r«ís  z,RequirementSet._to_install..schedule)r~rUr-)r%r�r&)r©rªr«r%r'Ú _to_installàs   zRequirementSet._to_installcOsÞ|jƒ}|r(tjddjdd„|Dƒƒƒtƒ� x˜|D]�}|jrltjd|jƒtƒ�|jdd�WdQRXy|j||f|ž|ŽWn$|jr¢|j r¢|j ƒ‚YnX|jr¾|jr¾|j ƒ|j ƒq6WWdQRX||_ dS) zl Install everything in this set (after having downloaded and unpacked the packages) z!Installing collected packages: %sz, cSsg|] }|j‘qSr&)ri)r*rhr&r&r'r,sz*RequirementSet.install..zFound existing installation: %sT)r�N) r¬rsr r6rr—rŽÚinstallZinstall_succeededZrollback_uninstallr�r¥r[)r%Zinstall_optionsZglobal_optionsr¤ÚkwargsZ to_installZ requirementr&r&r'r­ús:  zRequirementSet.install)FNFFNFFFNTFNNFF)NN)F)FF)r8r9r:r(rpr7r„r†ÚpropertyrˆrŒrwrŽr”r•r™r’r§r¬r­r&r&r&r'rL�s4 4 [   'E  rL);Z __future__rÚ collectionsrÚ itertoolsrZloggingr‰Z pip._vendorrrZ pip.compatrZ pip.downloadrr r r r Zpip.exceptionsr rrrrrrrrrZpip.req.req_installrZ pip.utilsrrrrrZpip.utils.hashesrZpip.utils.loggingrZpip.utils.packagingrZpip.vcsr Z pip.wheelr!Z getLoggerr8rsÚobjectr"r;rGrFrCrJrLr&r&r&r'Ús0      0