σ °,(Xc@`s ddlmZddlmZddlmZddlmZddlZddlZddlZddlZddl Z ddl Z ddl Z yddl Z Wnek rΓddl Z nXddlZddlmZdZd „Zd efd „ƒYZdS( i(tabsolute_import(tdivision(tprint_function(tunicode_literalsNi(tutilsu.cache-versioncC`s|tjjtjƒ}tjtjj|dƒƒ}|jtj dƒd„|Dƒ}t j dj|ƒj dƒƒj ƒS(Nu*.pyics`s'|]}ttj|ƒjƒVqdS(N(tstrtoststattst_mtime(t.0tsource((st/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/cachestore.pys 4suuascii(Rtpathtdirnamet giscannert__file__tglobtjointappendtsystargvthashlibtsha1tencodet hexdigest(ttopleveltsourcestmtimes((st/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/cachestore.pyt_get_versionhash/s t CacheStorecB`sYeZd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Z d„Z RS( cC`s|jƒ|_|jƒdS(N(t _get_cachedirt _directoryt_check_cache_version(tself((st/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/cachestore.pyt__init__;scC`s*dtjkrdStjdƒ}|SdS(NuGI_SCANNER_DISABLE_CACHEu g-ir-scanner(RtenvirontNoneRtget_user_cache_dir(R tcachedir((st/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/cachestore.pyR?sc C`s1|jdkrdStƒ}tjj|jtƒ}y(t|dƒ}|jƒ}WdQXWn1t k r}|j t j kr‰d}q‚nX||kr dS|j ƒt jddƒ\}}y<tj|dƒ}|j|ƒWdQXtj||ƒWn,t k r,}|j t jkr&dS‚nXdS(Nuritprefixug-ir-scanner-cache-version-uw(RR#RRR Rt_CACHE_VERSION_FILENAMEtopentreadtIOErrorterrnotENOENTt_cleanttempfiletmkstemptfdopentwritetshutiltmovetEACCES( R t current_hashtversiont version_filet cache_hashtettmp_fdt tmp_filenamettmp_file((st/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/cachestore.pyRFs.    cC`sG|jdkrdStj|jdƒƒjƒ}tjj|j|ƒS(Nuutf-8( RR#RRRRRR R(R tfilenameR((st/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/cachestore.pyt _get_filenamejscC`s"tj|ƒjtj|ƒjkS(N(RRR(R tstore_filenameR=((st/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/cachestore.pyt_cache_is_validuscC`soytj|ƒWnWtk r?}|jtjkr9dS‚n,tk rj}|jtjkrddS‚nXdS(N(RtunlinkR*R+R4tOSErrorR,(R R=R9((st/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/cachestore.pyt_remove_filenameyscC`sRxKtj|jƒD]7}|tkr+qn|jtjj|j|ƒƒqWdS(N(RtlistdirRR'RCR R(R R=((st/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/cachestore.pyR-‰s cC`s|j|ƒ}|dkrdStjj|ƒrG|j||ƒrGdStjddƒ\}}y/tj|dƒ}t j ||ƒWdQXWn9t k rΙ}|j t j krΓ|j|ƒdS‚nXytj||ƒWn8t k r}|j t jkr|j|ƒq‚nXdS(NR&ug-ir-scanner-cache-uwb(R>R#RR texistsR@R.R/R0tpickletdumpR*R+tENOSPCRCR2R3R4(R R=tdataR?R:R;R<R9((st/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/cachestore.pytstores( $ cC`sΔ|j|ƒ}|dkrdSyt|dƒ}Wn,tk r`}|jtjkrZdS‚nX|j||ƒswdSytj|ƒ}Wn3t t t tj fk rΏ|j |ƒd}nX|S(Nurb(R>R#R(R*R+R,R@RFtloadtAttributeErrortEOFErrort ValueErrort BadPickleGetRC(R R=R?tfdR9RI((st/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/cachestore.pyRK¬s"   ( t__name__t __module__R!RRR>R@RCR-RJRK(((st/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/cachestore.pyR9s   $    (t __future__RRRRR+RRRR2RR.tcPickleRFt ImportErrorR tRR'RtobjectR(((st/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/cachestore.pyts&