Warning: session_start(): Session cannot be started after headers have already been sent in /home/tvrreohg/public_html/manga.php on line 13
3 Ävh€�ã@sœdZddlZddlZddlZddlZddlZddlZddlZddlZddl Z ddl m Z ddl m Z ddlmZmZmZmZddlZddlmZmZmZmZmZmZmZmZmZmZmZm Z m!Z!ddlm"Z"ddl#m$Z$dd l%m&Z&dd l'm(Z(dd l)m*Z*dd l+m,Z,dd l-m.Z.ej/dƒZ0ej/dej1ƒZ2ej/dƒZ3ej/dej1ƒj4Z5dj6ƒZ7ddddgZ8dZ9dZ:e:j;ejdd„Z?dd„Z@dEd d„ZAdFd!d"„ZBdGd#d$„ZCdedfd%d„ZDdHd&d'„ZEd(d)„ZFej/d*ej1ƒZGeFd+d,„ƒZHGd-d.„d.eIƒZJGd/d0„d0eJƒZKGd1d„deƒZLej/d2ƒjMZNd3d4„ZOd5d6„ZPdId7d8„ZQd9d:„ZRGd;d<„d„d>ejTƒZUejVjWfd?d@„ZXeQe9ƒeXƒZXdAdB„ZYdCdD„ZZdS)Jz#PyPI and direct package downloadingéN)Úwraps)Úsix)ÚurllibÚ http_clientÚ configparserÚmap) Ú CHECKOUT_DISTÚ DistributionÚ BINARY_DISTÚnormalize_pathÚ SOURCE_DISTÚ EnvironmentÚfind_distributionsÚ safe_nameÚ safe_versionÚ to_filenameÚ RequirementÚ DEVELOP_DISTÚEGG_DIST)Ú ssl_support)Úlog)ÚDistutilsError)Ú translate)Úget_all_headers)Úunescape)ÚWheelz^egg=([-A-Za-z0-9_.+!]+)$zhref\s*=\s*['"]?([^'"> ]+)z�([^<]+) \s+\(md5\)z([-+.a-z0-9]{2,}):z.tar.gz .tar.bz2 .tar .zip .tgzÚ PackageIndexÚdistros_for_urlÚparse_bdist_wininstÚinterpret_distro_nameéz¬sz(interpret_distro_name..r9Nr7)Ú py_versionrHrV)r?ÚanyÚrangerTr Újoin)rPrUrMr^rHrVrAr\r&r&r'r•s  $ccsntƒ}|j}|dkr>xTtjj|j|ƒD]}||ƒ|Vq&Wn,x*|D]"}||ƒ}||krD||ƒ|VqDWdS)zHList unique elements, preserving order. Remember all elements ever seen.N)ÚsetÚaddrZmovesÚ filterfalseÚ __contains__)ÚiterableÚkeyÚseenZseen_addÚelementÚkr&r&r'Úunique_everseen¹s  rkcstˆƒ‡fdd„ƒ}|S)zs Wrap a function returning an iterable such that the resulting iterable only ever yields unique items. cstˆ||ŽƒS)N)rk)ÚargsÚkwargs)Úfuncr&r'ÚwrapperÑszunique_values..wrapper)r)rnror&)rnr'Ú unique_valuesËsrpz3<([^>]*\srel\s{0,10}=\s{0,10}['"]?([^'" >]+)[^>]*)>ccsÆxvtj|ƒD]h}|jƒ\}}tttj|jƒjdƒƒƒ}d|ksFd|kr x,t j|ƒD]}t j j |t |jdƒƒƒVqRWq WxHdD]@}|j|ƒ}|d kr~t j||ƒ}|r~t j j |t |jdƒƒƒVq~WdS) zEFind rel="homepage" and rel="download" links in `page`, yielding URLsú,Zhomepager8r7ú Home PageúDownload URLN)rrrsr;)ÚRELÚfinditerÚgroupsrbrÚstrÚstripr0r?ÚHREFrr#ÚurljoinÚ htmldecoderLÚfindÚsearch)r@ÚpagerKÚtagZrelZrelsÚposr&r&r'Úfind_external_linksÜs "   r�c@s(eZdZdZdd„Zdd„Zdd„ZdS) ÚContentCheckerzP A null content checker that defines the interface for checking content cCsdS)z3 Feed a block of data to the hash. Nr&)ÚselfÚblockr&r&r'ÚfeedôszContentChecker.feedcCsdS)zC Check the hash. Return False if validation fails. Tr&)rƒr&r&r'Úis_validúszContentChecker.is_validcCsdS)zu Call reporter with information about the checker (hash name) substituted into the template. Nr&)rƒÚreporterÚtemplater&r&r'ÚreportszContentChecker.reportN)Ú__name__Ú __module__Ú __qualname__Ú__doc__r…r†r‰r&r&r&r'r‚ïsr‚c@sBeZdZejdƒZdd„Zedd„ƒZdd„Z dd „Z d d „Z d S) Ú HashCheckerzK(?Psha1|sha224|sha384|sha256|sha512|md5)=(?P[a-f0-9]+)cCs||_tj|ƒ|_||_dS)N)Ú hash_nameÚhashlibÚnewÚhashÚexpected)rƒr�r“r&r&r'Ú__init__s zHashChecker.__init__cCs>tjj|ƒd}|stƒS|jj|ƒ}|s0tƒS|f|jƒŽS)z5Construct a (possibly null) ContentChecker from a URLr7r;)rr#r=r‚Úpatternr}Ú groupdict)Úclsr@rFrKr&r&r'Úfrom_urls zHashChecker.from_urlcCs|jj|ƒdS)N)r’Úupdate)rƒr„r&r&r'r…szHashChecker.feedcCs|jjƒ|jkS)N)r’Z hexdigestr“)rƒr&r&r'r†!szHashChecker.is_validcCs||j}||ƒS)N)r�)rƒr‡rˆÚmsgr&r&r'r‰$s zHashChecker.reportN) rŠr‹rŒrZÚcompiler•r”Ú classmethodr˜r…r†r‰r&r&r&r'rŽs rŽcs<eZdZdZdKdd„ZdLd d „ZdMd d „ZdNd d„Zdd„Zdd„Z dd„Z dd„Z dOdd„Z dd„Z dP‡fdd„ Zdd„Zdd „Zd!d"„Zd#d$„Zd%d&„ZdQd'd(„ZdRd)d*„Zd+d,„Zd-Zd.d/„Zd0d1„ZdSd2d3„Zd4d5„Zd6d7„Zd8d9„Zd:d;„Zdd?„ƒZ!d@dA„Z"dBdC„Z#dDdE„Z$dFdG„Z%dHdI„Z&‡Z'S)Urz;A distribution index that scans web pages for download URLsúhttps://pypi.org/simple/Ú*NTcOs”tj|f|ž|Ž|dd|jdƒ …|_i|_i|_i|_tjdj t t |ƒƒƒj |_ g|_|ortjor|prtjƒ}|r†tj|ƒ|_n tjj|_dS)Nr6ú|)r r”r1Ú index_urlÚ scanned_urlsÚ fetched_urlsÚ package_pagesrZr›rarrrKÚallowsÚto_scanrZ is_availableZfind_ca_bundleZ opener_forÚopenerrÚrequestÚurlopen)rƒr ZhostsZ ca_bundleZ verify_sslrlÚkwZuse_sslr&r&r'r”,s zPackageIndex.__init__Fc CsÂ||jkr| rdSd|j|<t|ƒs4|j|ƒdStt|ƒƒ}|r^|j|ƒsRdS|jd|ƒ|sr| sr||jkr†tt|j |ƒƒdS|j|ƒsžd|j|<dS|j d|ƒd|j|<d}|j |||ƒ}|dkrÔdSd|j|j <d|j jddƒjƒk�r|jƒdS|j }|jƒ}t|tƒ�sRt|tjjƒ�r4d }n|j jd ƒ�pDd }|j|d ƒ}|jƒx6tj|ƒD](} tjj|t| jd ƒƒƒ} |j| ƒ�qfW|j |j!ƒ�r¾t"|d dƒdk�r¾|j#||ƒ}dS)z.)ÚfilterrWrDrÇr±Ú itertoolsÚstarmapÚ scan_egg_link)rƒZ search_pathÚdirsZ egg_linksr&r&r'Úscan_egg_links‘szPackageIndex.scan_egg_linksc Cs�ttjj||ƒƒ�}ttdttj|ƒƒƒ}WdQRXt |ƒdkrDdS|\}}x>t tjj||ƒƒD](}tjj|f|žŽ|_ t |_ |j|ƒq`WdS)Nr9)ÚopenrWrDrar±rÑrrwrxrTrrPr rHrc)rƒrDrÐZ raw_linesÚlinesZegg_pathZ setup_pathrNr&r&r'rÔ›s  zPackageIndex.scan_egg_linkc s؇fdd„}xHtj|ƒD]:}y |tjj|t|jdƒƒƒƒWqtk rPYqXqW||ƒ\}}|rÐxXt||ƒD]J}t |ƒ\}} |j dƒr²| r²|r¨|d||f7}n ˆj |ƒˆj |ƒqrWt jdd„|ƒSdSd S) z#Process the contents of a PyPI pagecsŒ|jˆjƒrˆtttjj|tˆjƒd…jdƒƒƒ}t|ƒdkrˆd|dkrˆt |dƒ}t |dƒ}dˆj j |j ƒiƒ|<t|ƒt|ƒfSdS)Nr6r9r:r7rT)NN)r2r r±rrr#r>rTr?rrr£Ú setdefaultr0r)rÄrAÚpkgÚver)rƒr&r'Úscan®s "  z(PackageIndex.process_index..scanr7z.pyz #egg=%s-%scSsd|jdddƒS)Nz%sr7r!r9)rL)Úmr&r&r'ÚÑsz,PackageIndex.process_index..r«N)ryrurr#rzr{rLr$r�rGr1Úneed_version_infoÚscan_urlÚPYPI_MD5Úsub) rƒr@r~rÜrKrÚrÛÚnew_urlr4Úfragr&)rƒr'rÀ«s$       zPackageIndex.process_indexcCs|jd|ƒdS)NzPPage at %s links to .py file(s) without version info; an index scan is required.)Úscan_all)rƒr@r&r&r'rßÖszPackageIndex.need_version_infocGs:|j|jkr*|r |j|f|žŽ|jdƒ|j|jƒdS)Nz6Scanning index of all packages (this may take a while))r r¢rÆr´rà)rƒršrlr&r&r'råÜs  zPackageIndex.scan_allcCs~|j|j|jdƒ|jj|jƒs:|j|j|jdƒ|jj|jƒsR|j|ƒx&t|jj|jfƒƒD]}|j|ƒqhWdS)Nr6) ràr Ú unsafe_namer£r·rgrQÚnot_found_in_indexr±)rƒÚ requirementr@r&r&r'Ú find_packagesås zPackageIndex.find_packagescsR|jƒ|j|ƒx,||jD]}||kr.|S|jd||ƒqWtt|ƒj||ƒS)Nz%s does not match %s)Úprescanrérgr³ÚsuperrÚobtain)rƒrèZ installerrN)Ú __class__r&r'rìôs zPackageIndex.obtaincCsL|j|jd|ƒ|jƒsH|jƒtj|ƒtd|jjtj j |ƒfƒ‚dS)z- checker is a ContentChecker zValidating %%s checksum for %sz7%s validation failed for %s; possible download problem?N) r‰r³r†r¸rWÚunlinkrr’r3rDrU)rƒÚcheckerrXÚtfpr&r&r'Ú check_hashýs  zPackageIndex.check_hashcCsTxN|D]F}|jdks4t|ƒ s4|jdƒs4tt|ƒƒr@|j|ƒq|jj|ƒqWdS)z;Add `urls` to the list that will be prescanned for searchesNzfile:)r¥r¯r2r±rràÚappend)rƒZurlsr@r&r&r'Úadd_find_links s      zPackageIndex.add_find_linkscCs"|jrtt|j|jƒƒd|_dS)z7Scan urls scheduled for prescanning (e.g. --find-links)N)r¥r±rrà)rƒr&r&r'rêszPackageIndex.prescancCs<||jr|jd}}n |jd}}|||jƒ|jƒdS)Nz#Couldn't retrieve index page for %rz3Couldn't find index page for %r (maybe misspelled?))rgr´rÆrærå)rƒrèÚmethršr&r&r'rç"s   zPackageIndex.not_found_in_indexcCs~t|tƒsjt|ƒ}|rR|j|jdƒ||ƒ}t|ƒ\}}|jdƒrN|j|||ƒ}|Stj j |ƒrb|St |ƒ}t |j ||ƒddƒS)aLocate and/or download `spec` to `tmpdir`, returning a local path `spec` may be a ``Requirement`` object, or a string containing a URL, an existing local filename, or a project/version requirement spec (i.e. the string form of a ``Requirement`` object). If it is the URL of a .py file with an unambiguous ``#egg=name-version`` tag (i.e., one that escapes ``-`` as ``_`` throughout), a trivial ``setup.py`` is automatically created alongside the downloaded file. If `spec` is a ``Requirement`` object or a string containing a project/version requirement spec, this method returns the location of a matching distribution (possibly after downloading it to `tmpdir`). If `spec` is a locally existing file or directory name, it is simply returned unchanged. If `spec` is a URL, it is downloaded to a subpath of `tmpdir`, and the local filename is returned. Various errors may be raised if a problem occurs during downloading. r7z.pyrPN)rºrr¯Ú _download_urlrLrGr1Ú gen_setuprWrDrÅr(r¿Úfetch_distribution)rƒr%ÚtmpdirrBÚfoundr4rFr&r&r'r8,s    zPackageIndex.downloadc sàˆjd|ƒi‰d}d ‡‡‡‡‡fdd„ }|rHˆjƒˆj|ƒ||ƒ}| r`|dk r`|||ƒ}|dkr‚ˆjdk rzˆjƒ||ƒ}|dkr¢| r¢ˆj|ƒ||ƒ}|dkrˆjdˆr¸dpºd|ƒnˆjd|ƒ|j|jd �SdS) a|Obtain a distribution suitable for fulfilling `requirement` `requirement` must be a ``pkg_resources.Requirement`` instance. If necessary, or if the `force_scan` flag is set, the requirement is searched for in the (online) package index as well as the locally installed packages. If a distribution matching `requirement` is found, the returned distribution's ``location`` is the value you would have gotten from calling the ``download()`` method with the matching distribution's URL or filename. If no matching distribution is found, ``None`` is returned. If the `source` flag is set, only source distributions and source checkout links will be considered. Unless the `develop_ok` flag is set, development and system eggs (i.e., those using the ``.egg-info`` format) will be ignored. zSearching for %sNcs”|dkr ˆ}x‚||jD]t}|jtkrJˆ rJ|ˆkrˆjd|ƒdˆ|<q||ko`|jtkp`ˆ }|rˆj|jˆƒ}||_tj j |jƒr|SqWdS)Nz&Skipping development or system egg: %sr7) rgrHrrÆr r8rPÚdownload_locationrWrDrÅ)ZreqÚenvrNZtestÚloc)Ú develop_okrƒÚskippedÚsourcerør&r'r|fs z-PackageIndex.fetch_distribution..findz:No local packages or working download links found for %s%sza source distribution of r«zBest match: %s)rP)N)r´rêrér¥rÆÚclonerú) rƒrèrøÚ force_scanrÿrýZ local_indexrNr|r&)rýrƒrþrÿrør'r÷Ns0       zPackageIndex.fetch_distributioncCs"|j||||ƒ}|dk r|jSdS)a3Obtain a file suitable for fulfilling `requirement` DEPRECATED; use the ``fetch_distribution()`` method now instead. For backward compatibility, this routine is identical but returns the ``location`` of the downloaded distribution instead of a distribution object. N)r÷rP)rƒrèrørrÿrNr&r&r'ÚfetchšszPackageIndex.fetchc Csütj|ƒ}|r*dd„t||jdƒdƒDƒp,g}t|ƒdkrÚtjj|ƒ}tjj|ƒ|krŠtjj ||ƒ}ddl m }|||ƒsŠt j ||ƒ|}ttjj |dƒdƒ�2} | jd|dj|djtjj|ƒdfƒWdQRX|S|rðtd ||fƒ‚ntd ƒ‚dS) NcSsg|]}|jr|‘qSr&)rR)r[Údr&r&r'ú ªsz*PackageIndex.gen_setup..r7r)Úsamefilezsetup.pyÚwzIfrom setuptools import setup setup(name=%r, version=%r, py_modules=[%r]) z†Can't unambiguously interpret project/version identifier %r; any dashes in the name or version should be escaped using underscores. %rzpCan't process plain .py files without an '#egg=name-version' suffix to enable automatic setup script generation.)rJrKrrLrTrWrDrUÚdirnameraZsetuptools.command.easy_installrÚshutilZcopy2r×ÚwriterQrRÚsplitextr) rƒrXrFrørKrÁrUÚdstrrÍr&r&r'rö§s2       zPackageIndex.gen_setupi c Cs|jd|ƒd}zîtj|ƒ}|j|ƒ}t|tjjƒrJtd||j |j fƒ‚|jƒ}d}|j }d}d|kr’t |dƒ} t tt| ƒƒ}|j|||||ƒt|dƒ�Z} xD|j|ƒ} | rÞ|j| ƒ| j| ƒ|d7}|j|||||ƒq Pq W|j||| ƒWdQRX|S|�r|jƒXdS) NzDownloading %szCan't download %s: %s %srr7zcontent-lengthzContent-LengthÚwbr;)r´rŽr˜rµrºrr»r¼rr®ršÚ dl_blocksizerÚmaxrÚintÚ reporthookr×r¹r…r rñr¸) rƒr@rXÚfprïr¶ÚblocknumZbsÚsizeZsizesrðr„r&r&r'Ú _download_toÒs:        zPackageIndex._download_tocCsdS)Nr&)rƒr@rXrZblksizerr&r&r'röszPackageIndex.reporthookcCsŒ|jdƒrt|ƒSy t||jƒSttjfk r€}z>djdd„|jDƒƒ}|r^|j ||ƒnt d||fƒ‚WYdd}~X�nt j j k r¢}z|Sd}~Xnæt j jk rì}z,|rÊ|j ||jƒnt d||jfƒ‚WYdd}~Xnœtjk �r8}z.|�r|j ||jƒnt d||jfƒ‚WYdd}~XnPtjtj fk �r†}z*|�rf|j ||ƒnt d||fƒ‚WYdd}~XnXdS)Nzfile:ú cSsg|] }t|ƒ‘qSr&)rw)r[Úargr&r&r'rÿsz)PackageIndex.open_url..z%s %szDownload error for %s: %sz;%s returned a bad status line. The server might be down, %s)r2Ú local_openÚopen_with_authr¦r$rÚ InvalidURLrarlrÆrrr»r¼ZURLErrorÚreasonZ BadStatusLineÚlineZ HTTPExceptionÚsocket)rƒr@ZwarningÚvršr&r&r'rµùs6  "zPackageIndex.open_urlcCst|ƒ\}}|r4x&d|kr0|jddƒjddƒ}qWnd}|jdƒrN|dd…}tjj||ƒ}|jt|ƒƒsztdj |d �ƒ‚|d ksŒ|jd ƒr˜|j ||ƒS|d ksª|jd ƒr¶|j ||ƒS|jdƒrÌ|j ||ƒS|dkrìt jjt jj|ƒdƒS|j|dƒ|j||ƒSdS)Nz..Ú.ú\Ú_Z__downloaded__z.egg.zipr,zInvalid filename {filename})rXÚsvnzsvn+Úgitzgit+zhg+rÍr9Tr/)rGÚreplacer1rWrDrar2rwr$ÚformatÚ _download_svnÚ _download_gitÚ _download_hgrr§Ú url2pathnamer#r=r²Ú_attempt_download)rƒrBr@rør3rFrXr&r&r'rõs(         zPackageIndex._download_urlcCs|j|dƒdS)NT)r¾)rƒr@r&r&r'rà=szPackageIndex.scan_urlcCs6|j||ƒ}d|jddƒjƒkr.|j|||ƒS|SdS)Nrªz content-typer«)rr·r0Ú_download_html)rƒr@rXr¶r&r&r'r)@s zPackageIndex._attempt_downloadcCslt|ƒ}x@|D]8}|jƒrtjd|ƒrD|jƒtj|ƒ|j||ƒSPqW|jƒtj|ƒtd|ƒ‚dS)Nz ([^- ]+ - )?Revision \d+:zUnexpected HTML page found at ) r×���rx���rZ���r}���r¸���rW���rî���r%��r���)rƒ���r@���r¶���rX���rÍ���r��r&���r&���r'���r*��G��s����     zPackageIndex._download_htmlc�������������C���s��|j�ddƒd�}g�}|jƒ�jdƒrâd|krâtjj|ƒ\}}}}}} | �râ|jdƒrâd|dd�…�krâ|dd�…�j�ddƒ\}}tjj|ƒ\} } | râd | kr¸| j�d dƒ\} } d | �d | �g}n d | �g}| }|||||| f}tjj|ƒ}|�jd ||ƒ�t j d dg|�d||g�ƒ�|S�)Nr:���r7���r���zsvn:ú@z//r6���r9���ú:z --username=z --password=z'Doing subversion checkout from %s to %sr!��Úcheckoutz-q) r?���r0���r2���r���r#���r=���Ú splituserÚ urlunparser´���Ú subprocessÚ check_call)rƒ���r@���rX���ZcredsrB���ÚnetlocrD���r\���ÚqrÃ���ÚauthÚhostÚuserZpwrA���r&���r&���r'���r%��V��s$����   zPackageIndex._download_svnc�������������C���sp���t�jj|�ƒ\}}}}}|jddƒd�}|jddƒd�}d�}d|krR|jddƒ\}}t�jj||||dfƒ}�|�|fS�)Nú+r7���r:���r���r+��r«���r;���)r���r#���Zurlsplitr?���ÚrsplitZ urlunsplit)r@���Ú pop_prefixrB���r2��rD���rE���rä���Úrevr&���r&���r'���Ú_vcs_split_rev_from_urlk��s����z$PackageIndex._vcs_split_rev_from_urlc�������������C���sr���|j�ddƒd�}|�j|dd�\}}|�jd||ƒ�tjddd ||gƒ�|d�k rn|�jd |ƒ�tjdd |d d |gƒ�|S�) Nr:���r7���r���T)r9��zDoing git clone from %s to %sr"��r���z--quietzChecking out %sz-Cr-��)r?���r;��r´���r0��r1��)rƒ���r@���rX���r:��r&���r&���r'���r&��}��s���� zPackageIndex._download_gitc���������� ���C���sv���|j�ddƒd�}|�j|dd�\}}|�jd||ƒ�tjddd ||gƒ�|d�k rr|�jd |ƒ�tjdd |d d d|dgƒ�|S�)Nr:���r7���r���T)r9��zDoing hg clone from %s to %sZhgr���z--quietzUpdating to %sz--cwdZupz-Cz-rz-q)r?���r;��r´���r0��r1��)rƒ���r@���rX���r:��r&���r&���r'���r'��Š��s���� zPackageIndex._download_hgc�������������G���s���t�j|f|žŽ��d�S�)N)r���r³���)rƒ���rš���rl���r&���r&���r'���r³���—��s����zPackageIndex.debugc�������������G���s���t�j|f|žŽ��d�S�)N)r���r´���)rƒ���rš���rl���r&���r&���r'���r´���š��s����zPackageIndex.infoc�������������G���s���t�j|f|žŽ��d�S�)N)r���rÆ���)rƒ���rš���rl���r&���r&���r'���rÆ������s����zPackageIndex.warn©rž���)r����r<��NT)F)F)F)N)N)FFFN)FF)N)F)(rŠ���r‹���rŒ���r����r”���r¾���r°���r²���rÖ���rÔ���rÀ���rß���rå���ré���rì���rñ���ró���rê���rç���r8���r÷���r��rö���r ��r��r��rµ���rõ���rà���r)��r*��r%��Ú staticmethodr;��r&��r'��r³���r´���rÆ���Ú __classcell__r&���r&���)rí���r'���r���)��sL����  3   +   #� J )$ #!   z!&(#(\d+|x[\da-fA-F]+)|[\w.:-]+);?c�������������C���s���|�j�dƒ}t|ƒS�)Nr7���)rL���r���)rK���Zwhatr&���r&���r'���Ú decode_entity¦��s���� r?��c�������������C���s ���t�t|�ƒS�)z'Decode HTML entities in the given text.)Ú entity_subr?��)Útextr&���r&���r'���r{���«��s����r{���c����������������s���‡�fdd„}|S�)Nc����������������s���‡�‡fdd„}|S�)Nc����������� ������s.���t�jƒ�}t�jˆƒ�z ˆ�|�|ŽS�t�j|ƒ�X�d�S�)N)r��ZgetdefaulttimeoutZsetdefaulttimeout)rl���rm���Z old_timeout)rn���Útimeoutr&���r'���Ú_socket_timeout²��s ����  z@socket_timeout.<locals>._socket_timeout.<locals>._socket_timeoutr&���)rn���rC��)rB��)rn���r'���rC��±��s����z'socket_timeout.<locals>._socket_timeoutr&���)rB��rC��r&���)rB��r'���Úsocket_timeout°��s���� rD��c�������������C���s2���t�jj|�ƒ}|jƒ�}tj|ƒ}|jƒ�}|jddƒS�)aq�� A function compatible with Python 2.3-3.3 that will encode auth from a URL suitable for an HTTP header. >>> str(_encode_auth('username%3Apassword')) 'dXNlcm5hbWU6cGFzc3dvcmQ=' Long auth strings should not cause a newline to be inserted. >>> long_auth = 'username:' + 'password'*10 >>> chr(10) in str(_encode_auth(long_auth)) False Ú r«���)r���r#���r>���ÚencodeÚbase64Z encodestringr½���r#��)r4��Zauth_sZ auth_bytesZ encoded_bytesZencodedr&���r&���r'���Ú _encode_auth¿��s ����  rH��c���������������@���s(���e�Zd�ZdZdd„�Zdd„�Zdd„�ZdS�) Ú Credentialz: A username/password pair. Use like a namedtuple. c�������������C���s���||�_�||�_d�S�)N)ÚusernameÚpassword)rƒ���rJ��rK��r&���r&���r'���r”���Û��s����zCredential.__init__c�������������c���s���|�j�V��|�jV��d�S�)N)rJ��rK��)rƒ���r&���r&���r'���Ú__iter__ß��s����zCredential.__iter__c�������������C���s ���dt�|�ƒ�S�)Nz%(username)s:%(password)s)Úvars)rƒ���r&���r&���r'���Ú__str__ã��s����zCredential.__str__N)rŠ���r‹���rŒ���r����r”���rL��rN��r&���r&���r&���r'���rI��Ö��s���rI��c���������������@���s0���e�Zd�Zdd„�Zedd„�ƒZdd„�Zdd„�Zd S�) Ú PyPIConfigc�������������C���sP���t�jdddgdƒ}tjj|�|ƒ�tjjtjjdƒdƒ}tjj |ƒrL|�j |ƒ�dS�)z% Load from ~/.pypirc rJ��rK��Ú repositoryr«���ú~z.pypircN) ÚdictÚfromkeysr���ÚRawConfigParserr”���rW���rD���ra���Ú expanduserrÅ���r¹���)rƒ���ZdefaultsZrcr&���r&���r'���r”���è��s ���� zPyPIConfig.__init__c����������������s&���‡�fdd„ˆ�j�ƒ�D�ƒ}ttˆ�j|ƒƒS�)Nc����������������s ���g�|�]}ˆ�j�|d�ƒjƒ�r|‘qS�)rP��)r·���rx���)r[���Úsection)rƒ���r&���r'���r��ö��s����z2PyPIConfig.creds_by_repository.<locals>.<listcomp>)ZsectionsrR��r���Ú_get_repo_cred)rƒ���Zsections_with_repositoriesr&���)rƒ���r'���Úcreds_by_repositoryó��s����zPyPIConfig.creds_by_repositoryc�������������C���s6���|�j�|dƒjƒ�}|t|�j�|dƒjƒ�|�j�|dƒjƒ�ƒfS�)NrP��rJ��rK��)r·���rx���rI��)rƒ���rV��Zrepor&���r&���r'���rW��ü��s����zPyPIConfig._get_repo_credc�������������C���s*���x$|�j�jƒ�D�]\}}|j|ƒr |S�q W�dS�)zŒ If the URL indicated appears to be a repository defined in this config, return the credential for that repository. N)rX��Úitemsr2���)rƒ���r@���rP��Úcredr&���r&���r'���Úfind_credential��s���� zPyPIConfig.find_credentialN)rŠ���r‹���rŒ���r”���ÚpropertyrX��rW��r[��r&���r&���r&���r'���rO��ç��s��� rO��c�������������C���s:��t�jj|�ƒ\}}}}}}|jdƒr,tjdƒ‚|d krFt�jj|ƒ\}} nd}|s~tƒ�j|�ƒ} | r~t | ƒ}| j |�f} t j d | žŽ��|rÄdt |ƒ�}|| ||||f} t�jj| ƒ} t�jj| ƒ}|jd|ƒ�n t�jj|�ƒ}|jd tƒ�||ƒ}|�r6t�jj|jƒ\}}}}}}||k�r6|| k�r6||||||f} t�jj| ƒ|_|S�) z4Open a urllib2 request, handling HTTP authenticationr,��znonnumeric port: ''ÚhttpÚhttpsNú*Authenticating as %s for %s (from .pypirc)zBasic Z Authorizationz User-Agent)r]��r^��)r_��)r���r#���r=���r1���r���r��r.��rO��r[��rw���rJ��r���r´���rH��r/��r§���ZRequestZ add_headerÚ user_agentr@���)r@���r¦���rB���r2��rD���ZparamsrE���rä���r4��r5��rZ��r´���rA���rã���r§���r��Ús2Zh2Zpath2Zparam2Zquery2Zfrag2r&���r&���r'���r�� ��s6����         r��c�������������C���s���|�S�)Nr&���)r@���r&���r&���r'���Ú fix_sf_url>��s����rb��c���������� ���C���s��t�jj|�ƒ\}}}}}}t�jj|ƒ}tjj|ƒr<t�jj|�ƒS�|j dƒrêtjj |ƒrêg�}xˆtj |ƒD�]b} tjj || ƒ} | dkržt | dƒ�} | jƒ�} W�dQ�R�X�P�ntjj | ƒr²| d7�} |jdj| d�ƒ�qbW�d} | j|�dj |ƒd �} d\}}n d\}}} ddi}tj| ƒ}t�jj|�||||ƒS�)z7Read a local path, with special support for directoriesr6���z index.htmlÚrNz<a href="{name}">{name}</a>)r3���zB<html><head><title>{url}{files}rE)r@ÚfileséÈÚOKé”úPath not foundú Not foundz content-typez text/html)rerf)rgrhri)rr#r=r§r(rWrDÚisfiler¨r1rÇrÉrar×r¹ròr$rÚStringIOr»r¼)r@rBrCrDZparamrErärXrdrÃÚfilepathrZbodyrÂZstatusÚmessager¶Z body_streamr&r&r'rBs,        r)N)N)N)N)r )[r�r0ÚsysrWrZrrrGr�rÒÚ functoolsrZsetuptools.externrZsetuptools.extern.six.movesrrrrr"Z pkg_resourcesrr r r r r rrrrrrrrZ distutilsrZdistutils.errorsrZfnmatchrZsetuptools.py27compatrZsetuptools.py33compatrZsetuptools.wheelrr›rJÚIryrárKr¯r?rSÚ__all__Z_SOCKET_TIMEOUTZ_tmplr$rRr`r(rrGrrIrYrrkrprtr�Úobjectr‚rŽrrâr@r?r{rDrHrIrTrOr§r¨rrbrr&r&r&r'Ús|  <           !  "   !~  &.