Warning: session_start(): Session cannot be started after headers have already been sent in /home/tvrreohg/public_html/manga.php on line 13
3 ÝPfi,ã @sèddlmZddlZddlZddlZyddlmZWn ek rTddlmZYnXddl m Z ddl m Z ddl mZddlmZdd lmZmZdd lmZdd lmZmZejeƒZGd d „d e ƒZdd„Zdd„Zdd„ZdS)é)Úabsolute_importN)Ú zip_longest)Ú izip_longest)Úsix)ÚCommand)Ú CommandError)Ú PackageFinder)Úget_installed_distributionsÚdist_is_editable)ÚRemovedInPip10Warning)Úmake_option_groupÚ index_groupcs|eZdZdZdZdZdZ‡fdd„Zdd„Zd d „Z d d „Z d d„Z dd„Z dd„Z dd„Zdd„Zdd„Zdd„Z‡ZS)Ú ListCommandzt List installed packages, including editables. Packages are listed in a case-insensitive sorted order. Úlistz %prog [options]zList installed packages.csâtt|ƒj||Ž|j}|jdddddd�|jddddd d�|jd d ddd d�|jd ddddd�|jjdddddd�|jddddd�|jdddd$dd�|jddd d!d"�tt|jƒ}|jjd#|ƒ|jjd#|ƒdS)%Nz-oz --outdatedÚ store_trueFzList outdated packages)ÚactionÚdefaultÚhelpz-uz --uptodatezList uptodate packagesz-ez --editablezList editable projects.z-lz--localzSIf in a virtualenv that has global access, do not list globally-installed packages.z--userÚuserz,Only output packages installed in user-site.)Údestrrrz--prezYInclude pre-release and development versions. By default, pip only finds stable versions.z--formatZstoreÚ list_formatÚlegacyÚcolumnsÚfreezeÚjsonzJSelect the output format among: legacy (default), columns, freeze or json.)rrÚchoicesrz--not-requiredÚ not_requiredz>List packages that are not dependencies of installed packages.)rrrr)rrrr) ÚsuperrÚ__init__Úcmd_optsZ add_optionr r ÚparserZinsert_option_group)ÚselfÚargsÚkwrZ index_opts)Ú __class__©ú/usr/lib/python3.6/list.pyr#s^ zListCommand.__init__cCst|j||j|j|j|d�S)zK Create a package finder appropriate to this list command. )Ú find_linksÚ index_urlsZallow_all_prereleasesÚ trusted_hostsÚprocess_dependency_linksÚsession)rr'Úprer)r*)r!Úoptionsr(r+r%r%r&Ú_build_package_findercsz!ListCommand._build_package_findercCs¼|jrtjdtƒ|jr$tjdtƒ|jr6tjdtƒ|jdkrLtjdtƒ|jr`|jr`t dƒ‚t |j |j |j d�}|jrˆ|j||ƒ}n|jrš|j||ƒ}|jr¬|j||ƒ}|j||ƒdS)Nz�--allow-external has been deprecated and will be removed in the future. Due to changes in the repository protocol, it no longer has any effect.z“--allow-all-external has been deprecated and will be removed in the future. Due to changes in the repository protocol, it no longer has any effect.z‘--allow-unverified has been deprecated and will be removed in the future. Due to changes in the repository protocol, it no longer has any effect.zÇThe default format will switch to columns in the future. You can use --format=(legacy|columns) (or define a format=(legacy|columns) in your pip.conf under the [list] section) to disable this warning.z5Options --outdated and --uptodate cannot be combined.)Z local_onlyZ user_onlyZeditables_only)Zallow_externalÚwarningsÚwarnr Zallow_all_externalZallow_unverifiedrÚoutdatedZuptodaterr ZlocalrZeditableÚ get_outdatedÚ get_uptodaterÚget_not_requiredÚoutput_package_listing)r!r-r"Úpackagesr%r%r&Úrunps<     zListCommand.runcCsdd„|j||ƒDƒS)NcSsg|]}|j|jkr|‘qSr%)Úlatest_versionÚparsed_version)Ú.0Údistr%r%r&ú ¨sz,ListCommand.get_outdated..)Úiter_packages_latest_infos)r!r6r-r%r%r&r2¦szListCommand.get_outdatedcCsdd„|j||ƒDƒS)NcSsg|]}|j|jkr|‘qSr%)r8r9)r:r;r%r%r&r<®sz,ListCommand.get_uptodate..)r=)r!r6r-r%r%r&r3¬szListCommand.get_uptodatecsBtƒ‰x$|D]}ˆjdd„|jƒDƒƒq Wt‡fdd„|DƒƒS)Ncss|] }|jVqdS)N)Úkey)r:Z requirementr%r%r&ú µsz/ListCommand.get_not_required..c3s|]}|jˆkr|VqdS)N)r>)r:Zpkg)Údep_keysr%r&r?¶s)ÚsetÚupdateZrequires)r!r6r-r;r%)r@r&r4²s zListCommand.get_not_requiredc csø|jg|j}|jr*tjddj|ƒƒg}g}x&|D]}|jdƒr4|j|jdƒƒq4W|j |ƒ�Ž}|j |||ƒ}|j |ƒxn|D]f}d}|j |j ƒ} |js¨dd„| Dƒ} | s®q€t| |jd�} | j} | jjrÐd}nd }| |_||_|Vq€WWdQRXdS) NzIgnoring indexes: %sú,zdependency_links.txtÚunknowncSsg|]}|jjs|‘qSr%)ÚversionZ is_prerelease)r:Ú candidater%r%r&r<Îsz:ListCommand.iter_packages_latest_infos..)r>ZwheelZsdist)Z index_urlZextra_index_urlsZno_indexÚloggerÚdebugÚjoinZ has_metadataÚextendZget_metadata_linesZ_build_sessionr.Zadd_dependency_linksZfind_all_candidatesr>r,ÚmaxZ_candidate_sort_keyrEÚlocationZis_wheelr8Úlatest_filetype) r!r6r-r(Zdependency_linksr;r+ÚfinderÚtypZall_candidatesZbest_candidateZremote_versionr%r%r&r=¸s8       z&ListCommand.iter_packages_latest_infoscCs0t|ƒrd|j|j|jfSd|j|jfSdS)Nz %s (%s, %s)z%s (%s))r Ú project_namerErL)r!r;r%r%r&Ú output_legacyßs  zListCommand.output_legacycCsd|j|ƒ|j|jfS)Nz%s - Latest: %s [%s])rQr8rM)r!r;r%r%r&Úoutput_legacy_latestész ListCommand.output_legacy_latestcCs¼t|dd„d�}|jdkr:|r:t||ƒ\}}|j||ƒn~|jdkrfxr|D]}tjd|j|jƒqJWnR|jdkr‚tjt||ƒƒn6x4|D],}|j r¤tj|j |ƒƒqˆtj|j |ƒƒqˆWdS)NcSs |jjƒS)N)rPÚlower)r;r%r%r&Úósz4ListCommand.output_package_listing..)r>rrz%s==%sr) ÚsortedrÚformat_for_columnsÚoutput_package_listing_columnsrGÚinforPrEÚformat_for_jsonr1rRrQ)r!r6r-ÚdataÚheaderr;r%r%r&r5ðs     z"ListCommand.output_package_listingcCsht|ƒdkr|jd|ƒt|ƒ\}}t|ƒdkrL|jddjtdd„|ƒƒƒx|D]}tj|ƒqRWdS)Nréú cSsd|S)Nú-r%)Úxr%r%r&rT sz.)ÚlenÚinsertÚtabulaterIÚmaprGrX)r!rZr[Z pkg_stringsÚsizesÚvalr%r%r&rWs     z*ListCommand.output_package_listing_columns)Ú__name__Ú __module__Ú __qualname__Ú__doc__ÚnameZusageZsummaryrr.r7r2r3r4r=rQrRr5rWÚ __classcell__r%r%)r$r&rs @ 6' rcCsˆt|ƒdkst‚dgtdd„|Dƒƒ}x |D]}dd„t||ƒDƒ}q.Wg}x0|D](}djdd„t||ƒDƒƒ}|j|ƒqTW||fS)Nrcss|]}t|ƒVqdS)N)r`)r:r_r%r%r&r?sztabulate..cSs"g|]\}}t|tt|ƒƒƒ‘qSr%)rKr`Ústr)r:ÚsÚcr%r%r&r<sztabulate..r]cSs*g|]"\}}|dk r"t|ƒj|ƒnd‘qS)NÚ)rlÚljust)r:rmrnr%r%r&r<s)r`ÚAssertionErrorrKrrIÚappend)ÚvalsrdÚrowÚresultZdisplayr%r%r&rbs   rbcCsœ|j}|rddddg}nddg}g}tdd„|Dƒƒr@|jdƒxR|D]J}|j|jg}|rr|j|jƒ|j|jƒt|ƒr†|j|jƒ|j|ƒqFW||fS)z_ Convert the package data into something usable by output_package_listing_columns. ZPackageZVersionZLatestZTypecss|]}t|ƒVqdS)N)r )r:r_r%r%r&r?2sz%format_for_columns..ZLocation) r1ÚanyrrrPrEr8rMr rL)Zpkgsr-Zrunning_outdatedr[rZZprojrtr%r%r&rV%s       rVcCsZg}xJ|D]B}|jtj|jƒdœ}|jrBtj|jƒ|d<|j|d<|j|ƒq Wtj |ƒS)N)rjrEr8rM) rPrZ text_typerEr1r8rMrrrÚdumps)r6r-rZr;rXr%r%r&rYFs  rY) Z __future__rrZloggingr/Ú itertoolsrÚ ImportErrorrZ pip._vendorrZpip.basecommandrZpip.exceptionsrZ pip.indexrZ pip.utilsr r Zpip.utils.deprecationr Zpip.cmdoptionsr r Z getLoggerrfrGrrbrVrYr%r%r%r&Ús(       |!