ó N3{Yc@sŠdZddlZddlZddlZddlmZddlZddlmZddl m Z ddl m Z ddlm Z ddlmZdd lmZdd lmZmZmZmZmZmZmZmZdd l mZd efd „ƒYZdefd„ƒYZde fd„ƒYZd„Zd„Z d„Z!d„Z"d„Z#d„Z$e%d„Z&d„Z'd„Z(dS(sUsetuptools.command.egg_info Create a distribution's .egg-info directory and contentsiÿÿÿÿN(tCommand(tlog(tsdist(t basestring(t svn_utils(t convert_path(tFileList(tparse_requirementst safe_namet parse_versiont safe_versiont yield_linest EntryPointtiter_entry_pointst to_filename(t walk_revctrltegg_infocBs»eZdZdd d!d"d#d$gZddgZidd 6dd6Zd„Zd„Zd„Ze d„Z d„Z d„Z d„Z d„Zd„Zed„ƒZd„Zd„ZRS(%s+create a distribution's .egg-info directorys egg-base=tesLdirectory containing .egg-info directories (default: top of the source tree)stag-svn-revisiontrs,Add subversion revision ID to version numberstag-datetds0Add date stamp (e.g. 20050528) to version numbers tag-build=tbs-Specify explicit tag to add to version numbersno-svn-revisiontRs*Don't add subversion revision ID [default]sno-datetDs"Don't include date stamp [default]cCsUd|_d|_d|_d|_d|_d|_d|_t|_ d|_ dS(Ni( tNonetegg_namet egg_versiontegg_baseRt tag_buildttag_svn_revisionttag_datetFalsetbroken_egg_infotvtags(tself((sL/opt/alt/python34/lib/python3.4/site-packages/setuptools/command/egg_info.pytinitialize_options)s        c CsKddlm}tdtddddd|jƒƒƒ}|||ƒdS(Niÿÿÿÿ(t edit_configRRiRR(tsetuptools.command.setoptR#tdictttags(R!tfilenameR#tvalues((sL/opt/alt/python34/lib/python3.4/site-packages/setuptools/command/egg_info.pytsave_version_info4scCs±t|jjƒƒ|_|jƒ|_|jƒ|_y$tt d|j|jfƒƒWn3t k rt j j d|j|jfƒ‚nX|jdkrÌ|jj}|p´ijdtjƒ|_n|jdƒt|jƒd|_|jtjkr"tjj|j|jƒ|_nd|jkr>|jƒn|j|jj_|jj}|dk r­|j|jjƒkr­|j|_t |jƒ|_!d|j_ndS(Ns%s==%ss2Invalid distribution name or version syntax: %s-%stRs .egg-infot-("Rt distributiontget_nameRR&R ttagged_versionRtlistRt ValueErrort distutilsterrorstDistutilsOptionErrorRRt package_dirtgettostcurdirtensure_dirnameRRtpathtjointcheck_broken_egg_infotmetadatatversiont _patched_disttkeytlowert_versionR t_parsed_version(R!tdirstpd((sL/opt/alt/python34/lib/python3.4/site-packages/setuptools/command/egg_info.pytfinalize_options?s2!   ! !  $ cCsl|r|j|||ƒnLtjj|ƒrh|dkrX| rXtjd||ƒdS|j|ƒndS(s¹Write `data` to `filename` or delete if empty If `data` is non-empty, this routine is the same as ``write_file()``. If `data` is empty but not ``None``, this is the same as calling ``delete_file(filename)`. If `data` is ``None``, then this is a no-op unless `filename` exists, in which case a warning is issued about the orphaned file (if `force` is false), or deleted (if `force` is true). s$%s not set in setup(), but %s existsN(t write_fileR6R9texistsRRtwarnt delete_file(R!twhatR'tdatatforce((sL/opt/alt/python34/lib/python3.4/site-packages/setuptools/command/egg_info.pytwrite_or_delete_filegs  cCsjtjd||ƒtjdkr4|jdƒ}n|jsft|dƒ}|j|ƒ|jƒndS(sªWrite `data` to `filename` (if not a dry run) after announcing it `what` is used in a log message to identify what is being written to the file. swriting %s to %sisutf-8twbN(i( Rtinfotsyst version_infotencodetdry_runtopentwritetclose(R!RJR'RKtf((sL/opt/alt/python34/lib/python3.4/site-packages/setuptools/command/egg_info.pyRF{s  cCs-tjd|ƒ|js)tj|ƒndS(s8Delete `filename` (if not a dry run) after announcing its deleting %sN(RRORSR6tunlink(R!R'((sL/opt/alt/python34/lib/python3.4/site-packages/setuptools/command/egg_info.pyRI‰s cCsE|jjƒ}|jr4|j|jƒr4t|ƒSt||jƒS(N(R,t get_versionR tendswithR (R!R=((sL/opt/alt/python34/lib/python3.4/site-packages/setuptools/command/egg_info.pyR.s cCsµ|j|jƒ|jj}xNtdƒD]@}|jd|ƒ}|||jtjj |j|jƒƒq)Wtjj |jdƒ}tjj |ƒr§|j |ƒn|j ƒdS(Nsegg_info.writerst installersnative_libs.txt( tmkpathRR,tfetch_build_eggR tloadtnameR6R9R:RGRIt find_sources(R!R[teptwritertnl((sL/opt/alt/python34/lib/python3.4/site-packages/setuptools/command/egg_info.pytrun—s ,cCs’d}|jr||j7}n|jrctjjdƒsLtjjdƒrc|d|jƒ7}n|jrŽddl}||jdƒ7}n|S(NR*s.svnsPKG-INFOs-r%siÿÿÿÿs-%Y%m%d( RRR6R9RGtget_svn_revisionRttimetstrftime(R!R=Rf((sL/opt/alt/python34/lib/python3.4/site-packages/setuptools/command/egg_info.pyR&¥s  $  cCsttjjtjƒjƒƒS(N(tstrRtSvnInfoR^R6R7t get_revision(((sL/opt/alt/python34/lib/python3.4/site-packages/setuptools/command/egg_info.pyRe±scCsJtjj|jdƒ}t|jƒ}||_|jƒ|j|_dS(s"Generate SOURCES.txt manifest files SOURCES.txtN( R6R9R:Rtmanifest_makerR,tmanifestRdtfilelist(R!tmanifest_filenametmm((sL/opt/alt/python34/lib/python3.4/site-packages/setuptools/command/egg_info.pyR`µs   cCsŽ|jd}|jtjkr:tjj|j|ƒ}ntjj|ƒrŠtjddddd||j ƒ|j |_ ||_ ndS(Ns .egg-infoR+iNs¦ Note: Your current .egg-info directory has a '-' in its name; this will not work correctly with "setup.py develop". Please rename %s to %s to correct this problem. ( RRR6R7R9R:RGRRHRR(R!tbei((sL/opt/alt/python34/lib/python3.4/site-packages/setuptools/command/egg_info.pyR;½s   (s egg-base=RsLdirectory containing .egg-info directories (default: top of the source tree)(stag-svn-revisionRs,Add subversion revision ID to version number(stag-dateRs0Add date stamp (e.g. 20050528) to version number(s tag-build=Rs-Specify explicit tag to add to version number(sno-svn-revisionRs*Don't add subversion revision ID [default](sno-dateRs"Don't include date stamp [default](t__name__t __module__t descriptiont user_optionstboolean_optionst negative_optR"R)RERRMRFRIR.RdR&t staticmethodReR`R;(((sL/opt/alt/python34/lib/python3.4/site-packages/setuptools/command/egg_info.pyRs0     (       RcBseZdZd„ZRS(s@File list that accepts only existing, platform-independent pathscCs|jdƒr|d }nt|ƒ}tjdkrÙyDtjj|ƒsgtjj|jdƒƒrz|jj |ƒnWqþt k rÕtjj|jdƒƒr¹|jj |ƒqÖt j d|tj ƒƒqþXn%tjj|ƒrþ|jj |ƒndS(Ns iÿÿÿÿisutf-8s!'%s' not %s encodable -- skipping(i(RZRRPRQR6R9RGRRtfilestappendtUnicodeEncodeErrorRRHtgetfilesystemencoding(R!titemR9((sL/opt/alt/python34/lib/python3.4/site-packages/setuptools/command/egg_info.pyRyÏs  -  (RqRrt__doc__Ry(((sL/opt/alt/python34/lib/python3.4/site-packages/setuptools/command/egg_info.pyRÌsRkcBsMeZdZd„Zd„Zd„Zd„Zd„Zd„Zd„Z RS(s MANIFEST.incCs(d|_d|_d|_d|_dS(Ni(t use_defaultstprunet manifest_onlytforce_manifest(R!((sL/opt/alt/python34/lib/python3.4/site-packages/setuptools/command/egg_info.pyR"ès   cCsdS(N((R!((sL/opt/alt/python34/lib/python3.4/site-packages/setuptools/command/egg_info.pyREîscCs™tƒ|_tjj|jƒs.|jƒn|jjƒ|jƒtjj|j ƒrg|j ƒn|j ƒ|jj ƒ|jj ƒ|jƒdS(N(RRmR6R9RGRltwrite_manifesttfindallt add_defaultsttemplatet read_templatetprune_file_listtsorttremove_duplicates(R!((sL/opt/alt/python34/lib/python3.4/site-packages/setuptools/command/egg_info.pyRdñs        cCsëtjdkr~g}xW|jjD]I}y|jdƒWn"tk r]tjd|ƒq"X|j|ƒq"W||j_n|jj}t j dkrÄg|D]}|j t j dƒ^q }n|j t |j|fd|jƒdS(s²Write the file list in 'self.filelist' (presumably as filled in by 'add_defaults()' and 'read_template()') to the manifest file named by 'self.manifest'. isutf-8s$'%s' not UTF-8 encodable -- skippingt/swriting manifest file '%s'N(i(RPRQRmRxRRRzRRHRyR6tseptreplacetexecuteRFRl(R!RxtfileRW((sL/opt/alt/python34/lib/python3.4/site-packages/setuptools/command/egg_info.pyR‚þs  +cCs&|jdƒs"tj||ƒndS(Nsstandard file not found:(t startswithRRH(R!tmsg((sL/opt/alt/python34/lib/python3.4/site-packages/setuptools/command/egg_info.pyRHscCs©tj|ƒ|jj|jƒ|jj|jƒttƒƒ}|r[|jj|ƒn"t j j |jƒr}|j ƒn|j dƒ}|jjdd|jƒdS(NRt*tprefix(RR„RmRyR…RlR/RtextendR6R9RGt read_manifesttget_finalized_commandtinclude_patternR(R!trcfilestei_cmd((sL/opt/alt/python34/lib/python3.4/site-packages/setuptools/command/egg_info.pyR„s  cCs|jdƒ}|jjƒ}|jjdd|jƒ|jjdd|ƒtjt j ƒ}|jj|d|ddƒdS(NtbuildR’s(RCS|CVS|\.svn)tis_regexi( R•R,t get_fullnameRmtexclude_patternRt build_basetretescapeR6R‹(R!R™tbase_dirR‹((sL/opt/alt/python34/lib/python3.4/site-packages/setuptools/command/egg_info.pyR‡%s ( RqRrR…R"RERdR‚RHR„R‡(((sL/opt/alt/python34/lib/python3.4/site-packages/setuptools/command/egg_info.pyRkäs     cCsZdj|ƒ}tjdkr0|jdƒ}nt|dƒ}|j|ƒ|jƒdS(s{Create a file with the specified name and write 'contents' (a sequence of strings without line terminators) to it. s isutf-8RNN(i(R:RPRQRRRTRURV(R'tcontentsRW((sL/opt/alt/python34/lib/python3.4/site-packages/setuptools/command/egg_info.pyRF.s  cCs»tjd|ƒ|js·|jj}|j|j|_}|j|j|_}z|j |j ƒWd|||_|_Xt |jddƒ}ddl m}|j|j |ƒndS(Ns writing %stzip_safeiÿÿÿÿ(t bdist_egg(RRORSR,R<RR=RR_twrite_pkg_infoRtgetattrRtsetuptools.commandR£twrite_safety_flag(tcmdtbasenameR'R<toldvertoldnametsafeR£((sL/opt/alt/python34/lib/python3.4/site-packages/setuptools/command/egg_info.pyR¤9s  cCs&tjj|ƒr"tjdƒndS(NssWARNING: 'depends.txt' is not used by setuptools 0.6! Use the install_requires/extras_require setup() args instead.(R6R9RGRRH(R¨R©R'((sL/opt/alt/python34/lib/python3.4/site-packages/setuptools/command/egg_info.pytwarn_depends_obsoleteJsc Cs–|j}djt|jpdƒƒg}xI|jp9ijƒD]2\}}|jd|djt|ƒƒfƒq@W|jd|dj|ƒƒdS(Ns s [%s] %st requirementsR*((R,R:R tinstall_requirestextras_requiretitemsRyRM(R¨R©R'tdistRKtextratreqs((sL/opt/alt/python34/lib/python3.4/site-packages/setuptools/command/egg_info.pytwrite_requirementsRs  !"*cCs_tjg|jjƒD]}|jddƒd^qƒ}|jd|dj|ƒdƒdS(Nt.iistop-level namess (R%tfromkeysR,titer_distribution_namestsplitRFR:(R¨R©R'tktpkgs((sL/opt/alt/python34/lib/python3.4/site-packages/setuptools/command/egg_info.pytwrite_toplevel_namesYs2cCst|||tƒdS(N(t write_argtTrue(R¨R©R'((sL/opt/alt/python34/lib/python3.4/site-packages/setuptools/command/egg_info.pyt overwrite_argcscCsgtjj|ƒd}t|j|dƒ}|dk rMdj|ƒd}n|j||||ƒdS(Nis (R6R9tsplitextR¥R,RR:RM(R¨R©R'RLtargnametvalue((sL/opt/alt/python34/lib/python3.4/site-packages/setuptools/command/egg_info.pyR½fs  cCsä|jj}t|tƒs'|dkr0|}nš|dk rÊg}xs|jƒD]e\}}t|tƒstj||ƒ}djt t |j ƒƒƒ}n|j d||fƒqOWdj|ƒ}n|j d||tƒdS(Ns s [%s] %s R*s entry points(R,t entry_pointst isinstanceRRR±R t parse_groupR:tmapRhR(RyRMR¾(R¨R©R'RaRKtsectionR¡((sL/opt/alt/python34/lib/python3.4/site-packages/setuptools/command/egg_info.pyt write_entriesms   !cCsntjjdƒrjtddƒ}x9|D]1}tjd|ƒ}|r(t|jdƒƒSq(W|jƒndS(NsPKG-INFOtrUsVersion:.*-r(\d+)\s*$ii( R6R9RGRTRžtmatchtinttgroupRV(RWtlineRÊ((sL/opt/alt/python34/lib/python3.4/site-packages/setuptools/command/egg_info.pytget_pkg_info_revision}s  ()R}R6RžRPt setuptoolsRtdistutils.errorsR1Rtsetuptools.command.sdistRtsetuptools.compatRRtdistutils.utilRtdistutils.filelistRt _FileListt pkg_resourcesRRR R R R R RRRRkRFR¤R­RµR¼R¿RR½RÈRÎ(((sL/opt/alt/python34/lib/python3.4/site-packages/setuptools/command/egg_info.pyts2    :¶J