ó . ^c@s¶ddlmZddljjZddlZddlZddlZddl Z ddl m Z m Z ddl mZddlZeZdd„Zdeejfd „ƒYZdS( iÿÿÿÿ(tlogN(tsixt ordered_seti(tsdist_add_defaultstccs@x9tjdƒD](}x|jƒ|ƒD] }|Vq)WqWdS(s%Find all files under revision controlssetuptools.file_findersN(t pkg_resourcestiter_entry_pointstload(tdirnameteptitem((s</usr/lib/python2.7/dist-packages/setuptools/command/sdist.pyt walk_revctrlstsdistcBsSeZdZd&ddddfd'gZiZd d d d gZed„eDƒƒZd„Z d„Z d„Z d„Z e ejd„ƒƒZd„Zejd(kpåd)ejkoÄd*knpåd+ejkoãd,knZer÷eZnd„Zd„Zd„Zd„Zd„Zd „Zd!„Zd"„Zd#„Zd$„ZRS(-s=Smart sdist that finds anything supported by revision controlsformats=s6formats for source distribution (comma-separated list)s keep-temptks1keep the distribution tree around after creating sarchive file(s)s dist-dir=tdsFdirectory to put the source distribution archive(s) in [default: dist]Rs.rsts.txts.mdccs|]}dj|ƒVqdS(s README{0}N(tformat(t.0text((s</usr/lib/python2.7/dist-packages/setuptools/command/sdist.pys )scCsÚ|jdƒ|jdƒ}|j|_|jjtjj|jdƒƒ|jƒx!|j ƒD]}|j|ƒqaW|j ƒt |j dgƒ}x<|j D]1}dd|f}||kr¡|j|ƒq¡q¡WdS(Ntegg_infos SOURCES.txtt dist_filesR R(t run_commandtget_finalized_commandtfilelisttappendtostpathtjoinRt check_readmetget_sub_commandstmake_distributiontgetattrt distributiont archive_files(tselftei_cmdtcmd_nameRtfiletdata((s</usr/lib/python2.7/dist-packages/setuptools/command/sdist.pytrun+s  "   cCstjj|ƒ|jƒdS(N(torigR tinitialize_optionst_default_to_gztar(R!((s</usr/lib/python2.7/dist-packages/setuptools/command/sdist.pyR(>scCs#tjdkrdSdg|_dS(Niiitbetaitgztar(iiiR*i(tsyst version_infotformats(R!((s</usr/lib/python2.7/dist-packages/setuptools/command/sdist.pyR)CscCs'|jƒtjj|ƒWdQXdS(s% Workaround for #516 N(t_remove_os_linkR'R R(R!((s</usr/lib/python2.7/dist-packages/setuptools/command/sdist.pyRIs ccssddd„ƒY}ttd|ƒ}y t`Wntk rBnXz dVWd||k rnttd|ƒnXdS(sG In a context, remove and restore os.link if it exists tNoValuecBseZRS((t__name__t __module__(((s</usr/lib/python2.7/dist-packages/setuptools/command/sdist.pyR0WstlinkN((RRR3t Exceptiontsetattr(R0torig_val((s</usr/lib/python2.7/dist-packages/setuptools/command/sdist.pyR/Ps    cCs[ytjj|ƒWn@tk rVtjƒ\}}}|jjjdj ƒ‚nXdS(Nttemplate( R'R t read_templateR4R,texc_infottb_nextttb_frametf_localstclose(R!t_ttb((s</usr/lib/python2.7/dist-packages/setuptools/command/sdist.pyt__read_template_hackes  iiiiiicCsOtjrtj|ƒn tƒjƒtjjdƒrK|jj dƒndS(Nspyproject.toml( RtPY2Rt_add_defaults_optionaltsuperRRtisfileRR(R!((s</usr/lib/python2.7/dist-packages/setuptools/command/sdist.pyRB|s   cCsQ|jjƒrM|jdƒ}|jj|jƒƒ|j|j|ƒƒndS(sgetting python filestbuild_pyN(Rthas_pure_modulesRRtextendtget_source_filest_add_data_filest_safe_data_files(R!RE((s</usr/lib/python2.7/dist-packages/setuptools/command/sdist.pyt_add_defaults_python„scCs|jjrdS|jS(s¶ Extracting data_files from build_py is known to cause infinite recursion errors when `include_package_data` is enabled, so suppress it in that case. ((Rtinclude_package_datat data_files(R!RE((s</usr/lib/python2.7/dist-packages/setuptools/command/sdist.pyRJ‹s cCs|jjd„|DƒƒdS(sA Add data files as found in build_py.data_files. css=|]3\}}}}|D]}tjj||ƒVqqdS(N(RRR(RR>tsrc_dirt filenamestname((s</usr/lib/python2.7/dist-packages/setuptools/command/sdist.pys šsN(RRG(R!RM((s</usr/lib/python2.7/dist-packages/setuptools/command/sdist.pyRI•s cCsOy*tjrtj|ƒn tƒjƒWntk rJtjdƒnXdS(Ns&data_files contains unexpected objects(RRARt_add_defaults_data_filesRCt TypeErrorRtwarn(R!((s</usr/lib/python2.7/dist-packages/setuptools/command/sdist.pyRQŸs   cCsKxD|jD]}tjj|ƒr dSq W|jddj|jƒƒdS(Ns,standard file not found: should have one of s, (tREADMESRRtexistsRSR(R!tf((s</usr/lib/python2.7/dist-packages/setuptools/command/sdist.pyR¨s cCs†tjj|||ƒtjj|dƒ}ttdƒrltjj|ƒrltj|ƒ|j d|ƒn|j dƒj |ƒdS(Ns setup.cfgR3R( R'R tmake_release_treeRRRthasattrRUtunlinkt copy_fileRtsave_version_info(R!tbase_dirtfilestdest((s</usr/lib/python2.7/dist-packages/setuptools/command/sdist.pyRW²s ! cCsStjj|jƒstStj|jdƒ}|jƒ}WdQX|djƒkS(Ntrbs+# file GENERATED by distutils, do NOT edit ( RRRDtmanifesttFalsetiotopentreadlinetencode(R!tfpt first_line((s</usr/lib/python2.7/dist-packages/setuptools/command/sdist.pyt_manifest_is_not_generated¿s cCsÃtjd|jƒt|jdƒ}x|D]…}tjryy|jdƒ}Wqytk rutjd|ƒq,qyXn|j ƒ}|j dƒs,| r¡q,n|j j |ƒq,W|j ƒdS(sªRead 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'R_sUTF-8s"%r not UTF-8 decodable -- skippingt#N(RtinfoR`RcRtPY3tdecodetUnicodeDecodeErrorRStstript startswithRRR=(R!R`tline((s</usr/lib/python2.7/dist-packages/setuptools/command/sdist.pyt read_manifestÉs     cCsñtjƒ}|jjdƒ}|jddƒ\}}|dkrRtjdƒn |j|ƒy|j |jj j ƒWnt k r™tj dƒnXx@|D]8}tjj|ƒs¡tj d|ƒ|j|ƒq¡q¡W|jj|ƒdS(svChecks if license_file' or 'license_files' is configured and adds any valid paths to 'self.filelist'. tmetadatat license_files''license_file' option was not specifieds,warning: 'license_files' option is malformeds8warning: Failed to find the configured license file '%s'N(NN(Rt OrderedSetRtget_option_dicttgettNoneRtdebugtaddtupdateRrt license_filesRRRSRRRUtremoveRRG(R!R]toptsR>RsRV((s</usr/lib/python2.7/dist-packages/setuptools/command/sdist.pyt check_licenseßs"     N(sformats=Ns6formats for source distribution (comma-separated list)(s dist-dir=RsFdirectory to put the source distribution archive(s) in [default: dist](iii(ii(iii(ii(iii( R1R2t__doc__Rwt user_optionst negative_opttREADME_EXTENSIONSttupleRTR&R(R)Rt staticmethodt contextlibtcontextmanagerR/t_sdist__read_template_hackR,R-thas_leaky_handleR8RBRKRJRIRQRRWRhRqR~(((s</usr/lib/python2.7/dist-packages/setuptools/command/sdist.pyR sB          (t distutilsRtdistutils.command.sdisttcommandR R'RR,RbR…tsetuptools.externRRt py36compatRRtlistt_default_revctrlR (((s</usr/lib/python2.7/dist-packages/setuptools/command/sdist.pyts