Changeset c101fe1 for waflib/Build.py
- Timestamp:
- Nov 13, 2013, 1:00:56 PM (10 years ago)
- Branches:
- feature/autosink, feature/cnn, feature/cnn_org, feature/constantq, feature/crepe, feature/crepe_org, feature/pitchshift, feature/pydocstrings, feature/timestretch, fix/ffmpeg5, master, pitchshift, sampler, timestretch, yinfft+
- Children:
- d3066e2
- Parents:
- 54e74f0
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
waflib/Build.py
r54e74f0 rc101fe1 133 133 for t in env['tools']: 134 134 self.setup(**t) 135 f=None 136 try: 137 dbfn=os.path.join(self.variant_dir,Context.DBFILE) 135 dbfn=os.path.join(self.variant_dir,Context.DBFILE) 136 try: 137 data=Utils.readf(dbfn,'rb') 138 except(IOError,EOFError): 139 Logs.debug('build: Could not load the build cache %s (missing)'%dbfn) 140 else: 138 141 try: 139 f=open(dbfn,'rb') 140 except(IOError,EOFError): 141 Logs.debug('build: Could not load the build cache %s (missing)'%dbfn) 142 else: 142 waflib.Node.pickle_lock.acquire() 143 waflib.Node.Nod3=self.node_class 143 144 try: 144 waflib.Node.pickle_lock.acquire() 145 waflib.Node.Nod3=self.node_class 146 try: 147 data=cPickle.load(f) 148 except Exception ,e: 149 Logs.debug('build: Could not pickle the build cache %s: %r'%(dbfn,e)) 150 else: 151 for x in SAVED_ATTRS: 152 setattr(self,x,data[x]) 153 finally: 154 waflib.Node.pickle_lock.release() 155 finally: 156 if f: 157 f.close() 145 data=cPickle.loads(data) 146 except Exception ,e: 147 Logs.debug('build: Could not pickle the build cache %s: %r'%(dbfn,e)) 148 else: 149 for x in SAVED_ATTRS: 150 setattr(self,x,data[x]) 151 finally: 152 waflib.Node.pickle_lock.release() 158 153 self.init_dirs() 159 154 def store(self): … … 165 160 waflib.Node.pickle_lock.acquire() 166 161 waflib.Node.Nod3=self.node_class 167 f=None 168 try: 169 f=open(db+'.tmp','wb') 170 cPickle.dump(data,f,-1) 171 finally: 172 if f: 173 f.close() 162 x=cPickle.dumps(data,-1) 174 163 finally: 175 164 waflib.Node.pickle_lock.release() 165 Utils.writef(db+'.tmp',x,m='wb') 176 166 try: 177 167 st=os.stat(db) 178 os. unlink(db)168 os.remove(db) 179 169 if not Utils.is_win32: 180 170 os.chown(db+'.tmp',st.st_uid,st.st_gid) … … 482 472 if self.relative_trick: 483 473 destfile=os.path.join(destpath,y.path_from(self.path)) 484 Utils.check_dir(os.path.dirname(destfile))485 474 else: 486 475 destfile=os.path.join(destpath,y.name) … … 625 614 try: 626 615 if not self.progress_bar: 627 Logs.info('- unlink%s'%tgt)616 Logs.info('- remove %s'%tgt) 628 617 os.remove(tgt) 629 618 except OSError:
Note: See TracChangeset
for help on using the changeset viewer.