ó b-äQc@sxdZddlZddlZddlZddlmZddlTddlmZddl m Z ddl m Z ddl mZdd lmZdd lmZmZmZmZmZmZmZmZdd l mZd efd „ƒYZdefd„ƒYZde fd„ƒYZd„Zd„Zd„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(t*(tlog(tsdist(t basestring(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((s?/usr/lib/python2.7/site-packages/setuptools/command/egg_info.pytinitialize_options+s        cCsCddlm}||iidd6dd6|jƒd6d6ƒdS(Niÿÿÿÿ(t edit_configiRRRR(tsetuptools.command.setoptR#ttags(R!tfilenameR#((s?/usr/lib/python2.7/site-packages/setuptools/command/egg_info.pytsave_version_info6s cCs«t|jjƒƒ|_|jƒ|_|jƒ|_y$tt d|j|jfƒƒWn-t k r‰t d|j|jfƒ‚nX|j dkrÆ|jj}|p®ijdtjƒ|_ n|jdƒt|jƒd|_|j tjkrtjj|j |jƒ|_nd|jkr8|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 ValueErrortDistutilsOptionErrorRRt package_dirtgettostcurdirtensure_dirnameRRtpathtjointcheck_broken_egg_infotmetadatatversiont _patched_disttkeytlowert_versionR t_parsed_version(R!tdirstpd((s?/usr/lib/python2.7/site-packages/setuptools/command/egg_info.pytfinalize_optionsTs2!  ! !  $ 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_fileR2R5texistsRRtwarnt delete_file(R!twhatR&tdatatforce((s?/usr/lib/python2.7/site-packages/setuptools/command/egg_info.pytwrite_or_delete_file}s  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!RFR&RGtf((s?/usr/lib/python2.7/site-packages/setuptools/command/egg_info.pyRB‘s  cCs-tjd|ƒ|js)tj|ƒndS(s8Delete `filename` (if not a dry run) after announcing its deleting %sN(RRKROR2tunlink(R!R&((s?/usr/lib/python2.7/site-packages/setuptools/command/egg_info.pyREŸs cCsE|jjƒ}|jr4|j|jƒr4t|ƒSt||jƒS(N(R*t get_versionR tendswithR (R!R9((s?/usr/lib/python2.7/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 tloadtnameR2R5R6RCREt find_sources(R!RWteptwritertnl((s?/usr/lib/python2.7/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( RRR2R5RCtget_svn_revisionRttimetstrftime(R!R9Rb((s?/usr/lib/python2.7/site-packages/setuptools/command/egg_info.pyR%»s  $  cCs?d}tjdƒ}tjdƒ}xtjtjƒD]ñ\}}}d|kr_g|(q7n|jdƒttjj|ddƒƒ}|j ƒ}|j ƒ|j dƒr|j |ƒj dƒ}tg|j|ƒD]} t| j dƒƒ^qÚdgƒ} nÙyt|jƒdƒ} Wn d} nX| d kr[tjd |ƒg|(q7ntttj|jd ƒƒƒ}|dd=|dd }tg|D]2} t| ƒd krŸ| d rŸt| d ƒ^qŸdgƒ} |tjkrý|d} n|j | ƒsg|(q7nt|| ƒ}q7Wt|p;tƒƒS(Nis url="([^"]+)"scommitted-rev="(\d+)"s.svntentriesss.$ :ÿJ