b-Qc@siddlmZddlmZddlmZddlmZddlZddl Z ddl Z ddl Z ddlmZd#Z d$d%d&d'd(gZ dZddZdZddZddZdZe jde jZdZedee jde jfedefedefed efgZd!efd"YZdS()i(tsdist(t convert_path(tlog(tglobNtREADMEs README.rsts README.txts<ts"t"s't's&t&cCs-x&tD]\}}|j||}qW|S(N(tentitiestreplace(tdatatoldtnew((s</usr/lib/python2.7/site-packages/setuptools/command/sdist.pytunescapescsfd}|S(Nc3sut|d}|j}|jxIj|D]8}|jd}r_|}nt||Vq5WdS(NtrUi(topentreadtclosetfinditertgrouptjoinpath(tdirnametfilenametfR tmatchtpath(tpatterntpostproc(s</usr/lib/python2.7/site-packages/setuptools/command/sdist.pytfinds  ((RRR((RRs</usr/lib/python2.7/site-packages/setuptools/command/sdist.pyt re_finders cCs|s |Stjj||S(N(tosRtjoin(tprefixtsuffix((s</usr/lib/python2.7/site-packages/setuptools/command/sdist.pyR stccs@x9tjdD](}x|j|D] }|Vq)WqWdS(s%Find all files under revision controlssetuptools.file_findersN(t pkg_resourcestiter_entry_pointstload(Rteptitem((s</usr/lib/python2.7/site-packages/setuptools/command/sdist.pyt walk_revctrl-sccsxtD]\}}t||}tjj|rxe|||D]Q}tjj|rd|VqDtjj|rDxt|D] }|VqWqDqDWqqWdS(N(tfindersRR Rtisfiletisdirt_default_revctrl(RRtfinderR)((s</usr/lib/python2.7/site-packages/setuptools/command/sdist.pyR.3sc cst}t|d}xt|jdD]}|j}t|dkr(|\}}|jt|}|dkr|dkrt}q|dkr|r|j Pqq(q(W|j dSx;|j D]-}|j}|rt ||dVqqWdS( s$Find any 'svn:externals' directoriestrtR$itKs svn:externalstVNi( tFalseRtitertreadlinetsplittlenRtinttTrueRt splitlinesR( RRtfoundRtlinetpartstkindtlengthR ((s</usr/lib/python2.7/site-packages/setuptools/command/sdist.pytexternals_finder>s$       s%name="([^"]+)"(?![^>]+deleted="true")ccs3t|d}|j}|j|jdrnxtj|D]#}t|t|jdVqDWnd}yt |j d}WnnX|dkrt j dt jj|dSxhttj |jddD]G}| st|d kr|d d krqnt||dVqWdS( NRstD]}tjj|rdSqW|jddjtdS(Ns,standard file not found: should have one of s, (RqR RRuRDR!(R^R((s</usr/lib/python2.7/site-packages/setuptools/command/sdist.pyRTs  cCstj|||tjj|d}ttdritjj|ritj||jd|n|j dj |dS(Ns setup.cfgtlinkRM( Retmake_release_treeR RR!thasattrRutunlinkt copy_fileRQtsave_version_info(R^tbase_dirRtdest((s</usr/lib/python2.7/site-packages/setuptools/command/sdist.pyRs ! cCsYtjj|jstSt|jd}z|j}Wd|jX|djkS(NtrbUs+# file GENERATED by distutils, do NOT edit ( R RR,tmanifestR3RR5Rtencode(R^tfpt first_line((s</usr/lib/python2.7/site-packages/setuptools/command/sdist.pyt_manifest_is_not_generated s cCstjd|jt|jd}x|D]}tjdkry|jd}Wqtk r{tjd|q,qXn|j }|j ds,| rq,n|j j |q,W|j dS( sRead the manifest file (named by 'self.manifest') and use it to fill in 'self.filelist', the list of files to include in the source distribution. sreading manifest file '%s'RisUTF-8s"%r not UTF-8 decodable -- skippingt#N(i(RtinfoRRRgt version_infotdecodetUnicodeDecodeErrorRDtstripRBRRRSR(R^RR<((s</usr/lib/python2.7/site-packages/setuptools/command/sdist.pyt read_manifests    N(sformats=Ns6formats for source distribution (comma-separated list)(s dist-dir=RLsFdirectory to put the source distribution archive(s) in [default: dist](iii(ii(iii(ii(iii(t__name__t __module__t__doc__tNonet user_optionst negative_optRct_sdist__read_template_hackRgRRfRRTRRR(((s</usr/lib/python2.7/site-packages/setuptools/command/sdist.pyRs(     5 (Rs README.rsts README.txt(s<R(s>R(s"R(s'R(s&R (tdistutils.command.sdistRRetdistutils.utilRRaRRR treRgR%RqR RRRRR*R.R@tcompiletIRCRJtMR+(((s</usr/lib/python2.7/site-packages/setuptools/command/sdist.pyts,0