GXc@`sdZddlmZmZmZddlmZddlZddlZddl Z ddl Z ddddgZ d Z d Z d Zd Zed ZedZdZdZdZdZdS(s"update version string during buildi(tabsolute_importtdivisiontprint_function(t DistributionNt stamp_sourcetstamp_distutils_outputtappend_hg_revisiontas_boolcC`s#|dj|p"tj|S(Ntcmdclass(tgetRtget_command_class(toptstname((s8/usr/lib/python2.7/site-packages/passlib/_setup/stamp.pyR scC`s|jdij|iS(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}|jSWdQXdS(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`stjj|dd}t|}tjddt||\}}t||d|tjj|d}tjj|rt|}tjdd|\}}t||d|nd S( s/ update version info in passlib source tpasslibs __init__.pys(?m)^__version__\s*=.*$s__version__ = R ssetup.pys(?m)^stamp_build\s*=.*$sstamp_build = FalseN( RRtjoinRtretsubntreprR!R(tbase_dirtversionR RRtcount((s8/usr/lib/python2.7/site-packages/passlib/_setup/stamp.pyR0s     c`s|t|ddffdY}||dds(