ó ƒGXc@`sŘdZddlmZmZmZddlmZddlZddlZddl Z ddl Z ddddgZ d „Z d „Z d „Zd „Zed „Zed„Zd„Zd„Zd„Zd„ZdS(s"update version string during buildi(tabsolute_importtdivisiontprint_function(t DistributionNt stamp_sourcetstamp_distutils_outputtappend_hg_revisiontas_boolcC`s#|dj|ƒp"tƒj|ƒS(Ntcmdclass(tgetRtget_command_class(toptstname((s8/usr/lib/python2.7/site-packages/passlib/_setup/stamp.pyR scC`s|jdiƒj|iƒS(Ntoptions(t setdefault(R tcommand((s8/usr/lib/python2.7/site-packages/passlib/_setup/stamp.pytget_command_optionsscK`st||ƒj|ƒdS(N(Rtupdate(R Rtkwds((s8/usr/lib/python2.7/site-packages/passlib/_setup/stamp.pytset_command_optionsscC`s&t|dƒ}|jƒSWdQXdS(Ntr(topentread(tpathtfh((s8/usr/lib/python2.7/site-packages/passlib/_setup/stamp.pyt _get_file scC`sU|r dStjj|ƒr,tj|ƒnt|dƒ}|j|ƒWdQXdS(Ntw(tosRtexiststunlinkRtwrite(Rtcontenttdry_runR((s8/usr/lib/python2.7/site-packages/passlib/_setup/stamp.pyt _replace_file%s cC`sôtjj|ddƒ}t|ƒ}tjddt|ƒ|ƒ\}}|dksatdƒ‚t||d|ƒtjj|dƒ}tjj |ƒrđt|ƒ}tjd d |ƒ\}}|dksÚtd ƒ‚t||d|ƒnd S( s/ update version info in passlib source tpasslibs __init__.pys(?m)^__version__\s*=.*$s__version__ = is failed to replace version stringR ssetup.pys(?m)^stamp_build\s*=.*$sstamp_build = Falses#failed to update 'stamp_build' flagN( RRtjoinRtretsubntreprtAssertionErrorR!R(tbase_dirtversionR RRtcount((s8/usr/lib/python2.7/site-packages/passlib/_setup/stamp.pyR0s     c`s|t|dƒ‰dˆf‡‡fd†ƒY}||ddRFt__all__R RRRtFalseR!RRRRRT(((s8/usr/lib/python2.7/site-packages/passlib/_setup/stamp.pyts(