Commits

RAH  committed e350b8e Draft

Updated timezones watch face to build using ./waf. Should work great on cloud pebble.net.

  • Participants
  • Parent commits a5d3b6c

Comments (0)

Files changed (137)

File timezones/.gitignore

+
+# Ignore ignore files
+.hgignore
+.gitignore
+
+# Ignore waf build tool generated files
+.waf*
+build
+.lock-waf*
+
+# Ignore linked files/directories
+waf
+wscript
+tools
+include
+lib
+pebble_app.ld
+
+# Ignore other generated files
+serial_dump.txt

File timezones/.hgignore

+# use glob syntax.
+syntax: glob
+
+
+# Ignore ignore files
+.hgignore
+.gitignore
+
+# Ignore waf build tool generated files
+.waf*
+build
+.lock-waf*
+
+# Ignore linked files/directories
+waf
+wscript
+tools
+include
+lib
+pebble_app.ld
+
+# Ignore other generated files
+serial_dump.txt

File timezones/.lock-waf_darwin_build

+argv = ['./waf', 'configure']
+environ = {'TERM_SESSION_ID': 'C0D1FEAE-33B3-462D-805C-FC8F62781BAE', 'SSH_AUTH_SOCK': '/tmp/launch-FLF1yO/Listeners', 'TERM_PROGRAM_VERSION': '309', 'SHELL': '/bin/bash', 'LOGNAME': 'ryanahutchinson', 'USER': 'ryanahutchinson', 'HOME': '/Volumes/Macintosh_Data/Users/hutch', 'PATH': '/Library/Frameworks/Python.framework/Versions/2.7/bin:/Volumes/Macintosh_Data/Users/hutch/pebble-dev/arm-cs-tools/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin', 'TMPDIR': '/var/folders/d5/br5pbfcs1xb5833j_m9ym7s40000gn/T/', 'TERM_PROGRAM': 'Apple_Terminal', 'LANG': 'en_US.UTF-8', 'TERM': 'xterm-256color', 'Apple_PubSub_Socket_Render': '/tmp/launch-5GwORb/Render', 'SHLVL': '1', 'OLDPWD': '/Volumes/Macintosh_Data/Users/hutch', '__CF_USER_TEXT_ENCODING': '0x1F5:0:0', 'Apple_Ubiquity_Message': '/tmp/launch-sbpeVc/Apple_Ubiquity_Message', 'PWD': '/Volumes/Macintosh_Data/Users/hutch/pebble-dev/watches/4tz', '_': './waf', 'COMMAND_MODE': 'unix2003'}
+files = ['/Volumes/Macintosh_Data/Users/hutch/pebble-dev/watches/4tz/wscript']
+hash = -6438031668512116530
+options = {'files': '', 'jobs': 2, 'verbose': 0, 'nocache': False, 'progress_bar': 0, 'timestamp': None, 'distcheck_args': None, 'top': '', 'destdir': '', 'keep': 0, 'zones': '', 'debug': False, 'prefix': '/usr/local/', 'download': False, 'force': False, 'targets': '', 'out': ''}
+out_dir = '/Volumes/Macintosh_Data/Users/hutch/pebble-dev/watches/4tz/build'
+run_dir = '/Volumes/Macintosh_Data/Users/hutch/pebble-dev/watches/4tz'
+top_dir = '/Volumes/Macintosh_Data/Users/hutch/pebble-dev/watches/4tz'

File timezones/.waf-1.7.0-9334f7e963bee5410f4fa28728feffdd/waflib/Build.py

+#! /usr/bin/env python
+# encoding: utf-8
+# WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file
+
+import os,sys,errno,re,shutil
+try:
+	import cPickle
+except ImportError:
+	import pickle as cPickle
+from waflib import Runner,TaskGen,Utils,ConfigSet,Task,Logs,Options,Context,Errors
+import waflib.Node
+CACHE_DIR='c4che'
+CACHE_SUFFIX='_cache.py'
+INSTALL=1337
+UNINSTALL=-1337
+SAVED_ATTRS='root node_deps raw_deps task_sigs'.split()
+CFG_FILES='cfg_files'
+POST_AT_ONCE=0
+POST_LAZY=1
+POST_BOTH=2
+class BuildContext(Context.Context):
+	'''executes the build'''
+	cmd='build'
+	variant=''
+	def __init__(self,**kw):
+		super(BuildContext,self).__init__(**kw)
+		self.is_install=0
+		self.top_dir=kw.get('top_dir',Context.top_dir)
+		self.run_dir=kw.get('run_dir',Context.run_dir)
+		self.post_mode=POST_AT_ONCE
+		self.out_dir=kw.get('out_dir',Context.out_dir)
+		self.cache_dir=kw.get('cache_dir',None)
+		if not self.cache_dir:
+			self.cache_dir=self.out_dir+os.sep+CACHE_DIR
+		self.all_envs={}
+		self.task_sigs={}
+		self.node_deps={}
+		self.raw_deps={}
+		self.cache_dir_contents={}
+		self.task_gen_cache_names={}
+		self.launch_dir=Context.launch_dir
+		self.jobs=Options.options.jobs
+		self.targets=Options.options.targets
+		self.keep=Options.options.keep
+		self.cache_global=Options.cache_global
+		self.nocache=Options.options.nocache
+		self.progress_bar=Options.options.progress_bar
+		self.deps_man=Utils.defaultdict(list)
+		self.current_group=0
+		self.groups=[]
+		self.group_names={}
+	def get_variant_dir(self):
+		if not self.variant:
+			return self.out_dir
+		return os.path.join(self.out_dir,self.variant)
+	variant_dir=property(get_variant_dir,None)
+	def __call__(self,*k,**kw):
+		kw['bld']=self
+		ret=TaskGen.task_gen(*k,**kw)
+		self.task_gen_cache_names={}
+		self.add_to_group(ret,group=kw.get('group',None))
+		return ret
+	def __copy__(self):
+		raise Errors.WafError('build contexts are not supposed to be copied')
+	def install_files(self,*k,**kw):
+		pass
+	def install_as(self,*k,**kw):
+		pass
+	def symlink_as(self,*k,**kw):
+		pass
+	def load_envs(self):
+		node=self.root.find_node(self.cache_dir)
+		if not node:
+			raise Errors.WafError('The project was not configured: run "waf configure" first!')
+		lst=node.ant_glob('**/*%s'%CACHE_SUFFIX,quiet=True)
+		if not lst:
+			raise Errors.WafError('The cache directory is empty: reconfigure the project')
+		for x in lst:
+			name=x.path_from(node).replace(CACHE_SUFFIX,'').replace('\\','/')
+			env=ConfigSet.ConfigSet(x.abspath())
+			self.all_envs[name]=env
+			for f in env[CFG_FILES]:
+				newnode=self.root.find_resource(f)
+				try:
+					h=Utils.h_file(newnode.abspath())
+				except(IOError,AttributeError):
+					Logs.error('cannot find %r'%f)
+					h=Utils.SIG_NIL
+				newnode.sig=h
+	def init_dirs(self):
+		if not(os.path.isabs(self.top_dir)and os.path.isabs(self.out_dir)):
+			raise Errors.WafError('The project was not configured: run "waf configure" first!')
+		self.path=self.srcnode=self.root.find_dir(self.top_dir)
+		self.bldnode=self.root.make_node(self.variant_dir)
+		self.bldnode.mkdir()
+	def execute(self):
+		self.restore()
+		if not self.all_envs:
+			self.load_envs()
+		self.execute_build()
+	def execute_build(self):
+		Logs.info("Waf: Entering directory `%s'"%self.variant_dir)
+		self.recurse([self.run_dir])
+		self.pre_build()
+		self.timer=Utils.Timer()
+		if self.progress_bar:
+			sys.stderr.write(Logs.colors.cursor_off)
+		try:
+			self.compile()
+		finally:
+			if self.progress_bar==1:
+				c=len(self.returned_tasks)or 1
+				self.to_log(self.progress_line(c,c,Logs.colors.BLUE,Logs.colors.NORMAL))
+				print('')
+				sys.stdout.flush()
+				sys.stderr.write(Logs.colors.cursor_on)
+			Logs.info("Waf: Leaving directory `%s'"%self.variant_dir)
+		self.post_build()
+	def restore(self):
+		try:
+			env=ConfigSet.ConfigSet(os.path.join(self.cache_dir,'build.config.py'))
+		except(IOError,OSError):
+			pass
+		else:
+			if env['version']<Context.HEXVERSION:
+				raise Errors.WafError('Version mismatch! reconfigure the project')
+			for t in env['tools']:
+				self.setup(**t)
+		f=None
+		try:
+			dbfn=os.path.join(self.variant_dir,Context.DBFILE)
+			try:
+				f=open(dbfn,'rb')
+			except(IOError,EOFError):
+				Logs.debug('build: could not load the build cache %s (missing)'%dbfn)
+			else:
+				try:
+					waflib.Node.pickle_lock.acquire()
+					waflib.Node.Nod3=self.node_class
+					try:
+						data=cPickle.load(f)
+					except Exception ,e:
+						Logs.debug('build: could not pickle the build cache %s: %r'%(dbfn,e))
+					else:
+						for x in SAVED_ATTRS:
+							setattr(self,x,data[x])
+				finally:
+					waflib.Node.pickle_lock.release()
+		finally:
+			if f:
+				f.close()
+		self.init_dirs()
+	def store(self):
+		data={}
+		for x in SAVED_ATTRS:
+			data[x]=getattr(self,x)
+		db=os.path.join(self.variant_dir,Context.DBFILE)
+		try:
+			waflib.Node.pickle_lock.acquire()
+			waflib.Node.Nod3=self.node_class
+			f=None
+			try:
+				f=open(db+'.tmp','wb')
+				cPickle.dump(data,f)
+			finally:
+				if f:
+					f.close()
+		finally:
+			waflib.Node.pickle_lock.release()
+		try:
+			st=os.stat(db)
+			os.unlink(db)
+			if not Utils.is_win32:
+				os.chown(db+'.tmp',st.st_uid,st.st_gid)
+		except(AttributeError,OSError):
+			pass
+		os.rename(db+'.tmp',db)
+	def compile(self):
+		Logs.debug('build: compile()')
+		self.producer=Runner.Parallel(self,self.jobs)
+		self.producer.biter=self.get_build_iterator()
+		self.returned_tasks=[]
+		try:
+			self.producer.start()
+		except KeyboardInterrupt:
+			self.store()
+			raise
+		else:
+			if self.producer.dirty:
+				self.store()
+		if self.producer.error:
+			raise Errors.BuildError(self.producer.error)
+	def setup(self,tool,tooldir=None,funs=None):
+		if isinstance(tool,list):
+			for i in tool:self.setup(i,tooldir)
+			return
+		module=Context.load_tool(tool,tooldir)
+		if hasattr(module,"setup"):module.setup(self)
+	def get_env(self):
+		try:
+			return self.all_envs[self.variant]
+		except KeyError:
+			return self.all_envs['']
+	def set_env(self,val):
+		self.all_envs[self.variant]=val
+	env=property(get_env,set_env)
+	def add_manual_dependency(self,path,value):
+		if path is None:
+			raise ValueError('Invalid input')
+		if isinstance(path,waflib.Node.Node):
+			node=path
+		elif os.path.isabs(path):
+			node=self.root.find_resource(path)
+		else:
+			node=self.path.find_resource(path)
+		if isinstance(value,list):
+			self.deps_man[id(node)].extend(value)
+		else:
+			self.deps_man[id(node)].append(value)
+	def launch_node(self):
+		try:
+			return self.p_ln
+		except AttributeError:
+			self.p_ln=self.root.find_dir(self.launch_dir)
+			return self.p_ln
+	def hash_env_vars(self,env,vars_lst):
+		if not env.table:
+			env=env.parent
+			if not env:
+				return Utils.SIG_NIL
+		idx=str(id(env))+str(vars_lst)
+		try:
+			cache=self.cache_env
+		except AttributeError:
+			cache=self.cache_env={}
+		else:
+			try:
+				return self.cache_env[idx]
+			except KeyError:
+				pass
+		lst=[env[a]for a in vars_lst]
+		ret=Utils.h_list(lst)
+		Logs.debug('envhash: %s %r',Utils.to_hex(ret),lst)
+		cache[idx]=ret
+		return ret
+	def get_tgen_by_name(self,name):
+		cache=self.task_gen_cache_names
+		if not cache:
+			for g in self.groups:
+				for tg in g:
+					try:
+						cache[tg.name]=tg
+					except AttributeError:
+						pass
+		try:
+			return cache[name]
+		except KeyError:
+			raise Errors.WafError('Could not find a task generator for the name %r'%name)
+	def progress_line(self,state,total,col1,col2):
+		n=len(str(total))
+		Utils.rot_idx+=1
+		ind=Utils.rot_chr[Utils.rot_idx%4]
+		pc=(100.*state)/total
+		eta=str(self.timer)
+		fs="[%%%dd/%%%dd][%%s%%2d%%%%%%s][%s]["%(n,n,ind)
+		left=fs%(state,total,col1,pc,col2)
+		right='][%s%s%s]'%(col1,eta,col2)
+		cols=Logs.get_term_cols()-len(left)-len(right)+2*len(col1)+2*len(col2)
+		if cols<7:cols=7
+		ratio=((cols*state)//total)-1
+		bar=('='*ratio+'>').ljust(cols)
+		msg=Utils.indicator%(left,bar,right)
+		return msg
+	def declare_chain(self,*k,**kw):
+		return TaskGen.declare_chain(*k,**kw)
+	def pre_build(self):
+		for m in getattr(self,'pre_funs',[]):
+			m(self)
+	def post_build(self):
+		for m in getattr(self,'post_funs',[]):
+			m(self)
+	def add_pre_fun(self,meth):
+		try:
+			self.pre_funs.append(meth)
+		except AttributeError:
+			self.pre_funs=[meth]
+	def add_post_fun(self,meth):
+		try:
+			self.post_funs.append(meth)
+		except AttributeError:
+			self.post_funs=[meth]
+	def get_group(self,x):
+		if not self.groups:
+			self.add_group()
+		if x is None:
+			return self.groups[self.current_group]
+		if x in self.group_names:
+			return self.group_names[x]
+		return self.groups[x]
+	def add_to_group(self,tgen,group=None):
+		assert(isinstance(tgen,TaskGen.task_gen)or isinstance(tgen,Task.TaskBase))
+		tgen.bld=self
+		self.get_group(group).append(tgen)
+	def get_group_name(self,g):
+		if not isinstance(g,list):
+			g=self.groups[g]
+		for x in self.group_names:
+			if id(self.group_names[x])==id(g):
+				return x
+		return''
+	def get_group_idx(self,tg):
+		se=id(tg)
+		for i in range(len(self.groups)):
+			for t in self.groups[i]:
+				if id(t)==se:
+					return i
+		return None
+	def add_group(self,name=None,move=True):
+		if name and name in self.group_names:
+			Logs.error('add_group: name %s already present'%name)
+		g=[]
+		self.group_names[name]=g
+		self.groups.append(g)
+		if move:
+			self.current_group=len(self.groups)-1
+	def set_group(self,idx):
+		if isinstance(idx,str):
+			g=self.group_names[idx]
+			for i in range(len(self.groups)):
+				if id(g)==id(self.groups[i]):
+					self.current_group=i
+		else:
+			self.current_group=idx
+	def total(self):
+		total=0
+		for group in self.groups:
+			for tg in group:
+				try:
+					total+=len(tg.tasks)
+				except AttributeError:
+					total+=1
+		return total
+	def get_targets(self):
+		to_post=[]
+		min_grp=0
+		for name in self.targets.split(','):
+			tg=self.get_tgen_by_name(name)
+			if not tg:
+				raise Errors.WafError('target %r does not exist'%name)
+			m=self.get_group_idx(tg)
+			if m>min_grp:
+				min_grp=m
+				to_post=[tg]
+			elif m==min_grp:
+				to_post.append(tg)
+		return(min_grp,to_post)
+	def get_all_task_gen(self):
+		lst=[]
+		for g in self.groups:
+			lst.extend(g)
+		return lst
+	def post_group(self):
+		if self.targets=='*':
+			for tg in self.groups[self.cur]:
+				try:
+					f=tg.post
+				except AttributeError:
+					pass
+				else:
+					f()
+		elif self.targets:
+			if self.cur<self._min_grp:
+				for tg in self.groups[self.cur]:
+					try:
+						f=tg.post
+					except AttributeError:
+						pass
+					else:
+						f()
+			else:
+				for tg in self._exact_tg:
+					tg.post()
+		else:
+			ln=self.launch_node()
+			if ln.is_child_of(self.bldnode):
+				Logs.warn('Building from the build directory, forcing --targets=*')
+				ln=self.srcnode
+			elif not ln.is_child_of(self.srcnode):
+				Logs.warn('CWD %s is not under %s, forcing --targets=* (run distclean?)'%(ln.abspath(),self.srcnode.abspath()))
+				ln=self.srcnode
+			for tg in self.groups[self.cur]:
+				try:
+					f=tg.post
+				except AttributeError:
+					pass
+				else:
+					if tg.path.is_child_of(ln):
+						f()
+	def get_tasks_group(self,idx):
+		tasks=[]
+		for tg in self.groups[idx]:
+			try:
+				tasks.extend(tg.tasks)
+			except AttributeError:
+				tasks.append(tg)
+		return tasks
+	def get_build_iterator(self):
+		self.cur=0
+		if self.targets and self.targets!='*':
+			(self._min_grp,self._exact_tg)=self.get_targets()
+		global lazy_post
+		if self.post_mode!=POST_LAZY:
+			while self.cur<len(self.groups):
+				self.post_group()
+				self.cur+=1
+			self.cur=0
+		while self.cur<len(self.groups):
+			if self.post_mode!=POST_AT_ONCE:
+				self.post_group()
+			tasks=self.get_tasks_group(self.cur)
+			Task.set_file_constraints(tasks)
+			Task.set_precedence_constraints(tasks)
+			self.cur_tasks=tasks
+			self.cur+=1
+			if not tasks:
+				continue
+			yield tasks
+		while 1:
+			yield[]
+class inst(Task.Task):
+	color='CYAN'
+	def uid(self):
+		lst=[self.dest,self.path]+self.source
+		return Utils.h_list(repr(lst))
+	def post(self):
+		buf=[]
+		for x in self.source:
+			if isinstance(x,waflib.Node.Node):
+				y=x
+			else:
+				y=self.path.find_resource(x)
+				if not y:
+					if Logs.verbose:
+						Logs.warn('Could not find %s immediately (may cause broken builds)'%x)
+					idx=self.generator.bld.get_group_idx(self)
+					for tg in self.generator.bld.groups[idx]:
+						if not isinstance(tg,inst)and id(tg)!=id(self):
+							tg.post()
+						y=self.path.find_resource(x)
+						if y:
+							break
+					else:
+						raise Errors.WafError('could not find %r in %r'%(x,self.path))
+			buf.append(y)
+		self.inputs=buf
+	def runnable_status(self):
+		ret=super(inst,self).runnable_status()
+		if ret==Task.SKIP_ME:
+			return Task.RUN_ME
+		return ret
+	def __str__(self):
+		return''
+	def run(self):
+		return self.generator.exec_task()
+	def get_install_path(self,destdir=True):
+		dest=Utils.subst_vars(self.dest,self.env)
+		dest=dest.replace('/',os.sep)
+		if destdir and Options.options.destdir:
+			dest=os.path.join(Options.options.destdir,os.path.splitdrive(dest)[1].lstrip(os.sep))
+		return dest
+	def exec_install_files(self):
+		destpath=self.get_install_path()
+		if not destpath:
+			raise Errors.WafError('unknown installation path %r'%self.generator)
+		for x,y in zip(self.source,self.inputs):
+			if self.relative_trick:
+				destfile=os.path.join(destpath,y.path_from(self.path))
+				Utils.check_dir(os.path.dirname(destfile))
+			else:
+				destfile=os.path.join(destpath,y.name)
+			self.generator.bld.do_install(y.abspath(),destfile,self.chmod)
+	def exec_install_as(self):
+		destfile=self.get_install_path()
+		self.generator.bld.do_install(self.inputs[0].abspath(),destfile,self.chmod)
+	def exec_symlink_as(self):
+		destfile=self.get_install_path()
+		self.generator.bld.do_link(self.link,destfile)
+class InstallContext(BuildContext):
+	'''installs the targets on the system'''
+	cmd='install'
+	def __init__(self,**kw):
+		super(InstallContext,self).__init__(**kw)
+		self.uninstall=[]
+		self.is_install=INSTALL
+	def do_install(self,src,tgt,chmod=Utils.O644):
+		d,_=os.path.split(tgt)
+		if not d:
+			raise Errors.WafError('Invalid installation given %r->%r'%(src,tgt))
+		Utils.check_dir(d)
+		srclbl=src.replace(self.srcnode.abspath()+os.sep,'')
+		if not Options.options.force:
+			try:
+				st1=os.stat(tgt)
+				st2=os.stat(src)
+			except OSError:
+				pass
+			else:
+				if st1.st_mtime+2>=st2.st_mtime and st1.st_size==st2.st_size:
+					if not self.progress_bar:
+						Logs.info('- install %s (from %s)'%(tgt,srclbl))
+					return False
+		if not self.progress_bar:
+			Logs.info('+ install %s (from %s)'%(tgt,srclbl))
+		try:
+			os.remove(tgt)
+		except OSError:
+			pass
+		try:
+			shutil.copy2(src,tgt)
+			os.chmod(tgt,chmod)
+		except IOError:
+			try:
+				os.stat(src)
+			except(OSError,IOError):
+				Logs.error('File %r does not exist'%src)
+			raise Errors.WafError('Could not install the file %r'%tgt)
+	def do_link(self,src,tgt):
+		d,_=os.path.split(tgt)
+		Utils.check_dir(d)
+		link=False
+		if not os.path.islink(tgt):
+			link=True
+		elif os.readlink(tgt)!=src:
+			link=True
+		if link:
+			try:os.remove(tgt)
+			except OSError:pass
+			if not self.progress_bar:
+				Logs.info('+ symlink %s (to %s)'%(tgt,src))
+			os.symlink(src,tgt)
+		else:
+			if not self.progress_bar:
+				Logs.info('- symlink %s (to %s)'%(tgt,src))
+	def run_task_now(self,tsk,postpone):
+		tsk.post()
+		if not postpone:
+			if tsk.runnable_status()==Task.ASK_LATER:
+				raise self.WafError('cannot post the task %r'%tsk)
+			tsk.run()
+	def install_files(self,dest,files,env=None,chmod=Utils.O644,relative_trick=False,cwd=None,add=True,postpone=True):
+		tsk=inst(env=env or self.env)
+		tsk.bld=self
+		tsk.path=cwd or self.path
+		tsk.chmod=chmod
+		if isinstance(files,waflib.Node.Node):
+			tsk.source=[files]
+		else:
+			tsk.source=Utils.to_list(files)
+		tsk.dest=dest
+		tsk.exec_task=tsk.exec_install_files
+		tsk.relative_trick=relative_trick
+		if add:self.add_to_group(tsk)
+		self.run_task_now(tsk,postpone)
+		return tsk
+	def install_as(self,dest,srcfile,env=None,chmod=Utils.O644,cwd=None,add=True,postpone=True):
+		tsk=inst(env=env or self.env)
+		tsk.bld=self
+		tsk.path=cwd or self.path
+		tsk.chmod=chmod
+		tsk.source=[srcfile]
+		tsk.dest=dest
+		tsk.exec_task=tsk.exec_install_as
+		if add:self.add_to_group(tsk)
+		self.run_task_now(tsk,postpone)
+		return tsk
+	def symlink_as(self,dest,src,env=None,cwd=None,add=True,postpone=True):
+		if Utils.is_win32:
+			return
+		tsk=inst(env=env or self.env)
+		tsk.bld=self
+		tsk.dest=dest
+		tsk.path=cwd or self.path
+		tsk.source=[]
+		tsk.link=src
+		tsk.exec_task=tsk.exec_symlink_as
+		if add:self.add_to_group(tsk)
+		self.run_task_now(tsk,postpone)
+		return tsk
+class UninstallContext(InstallContext):
+	'''removes the targets installed'''
+	cmd='uninstall'
+	def __init__(self,**kw):
+		super(UninstallContext,self).__init__(**kw)
+		self.is_install=UNINSTALL
+	def do_install(self,src,tgt,chmod=Utils.O644):
+		if not self.progress_bar:
+			Logs.info('- remove %s'%tgt)
+		self.uninstall.append(tgt)
+		try:
+			os.remove(tgt)
+		except OSError ,e:
+			if e.errno!=errno.ENOENT:
+				if not getattr(self,'uninstall_error',None):
+					self.uninstall_error=True
+					Logs.warn('build: some files could not be uninstalled (retry with -vv to list them)')
+				if Logs.verbose>1:
+					Logs.warn('could not remove %s (error code %r)'%(e.filename,e.errno))
+		while tgt:
+			tgt=os.path.dirname(tgt)
+			try:
+				os.rmdir(tgt)
+			except OSError:
+				break
+	def do_link(self,src,tgt):
+		try:
+			if not self.progress_bar:
+				Logs.info('- unlink %s'%tgt)
+			os.remove(tgt)
+		except OSError:
+			pass
+		while tgt:
+			tgt=os.path.dirname(tgt)
+			try:
+				os.rmdir(tgt)
+			except OSError:
+				break
+	def execute(self):
+		try:
+			def runnable_status(self):
+				return Task.SKIP_ME
+			setattr(Task.Task,'runnable_status_back',Task.Task.runnable_status)
+			setattr(Task.Task,'runnable_status',runnable_status)
+			super(UninstallContext,self).execute()
+		finally:
+			setattr(Task.Task,'runnable_status',Task.Task.runnable_status_back)
+class CleanContext(BuildContext):
+	'''cleans the project'''
+	cmd='clean'
+	def execute(self):
+		self.restore()
+		if not self.all_envs:
+			self.load_envs()
+		self.recurse([self.run_dir])
+		try:
+			self.clean()
+		finally:
+			self.store()
+	def clean(self):
+		Logs.debug('build: clean called')
+		if self.bldnode!=self.srcnode:
+			lst=[self.root.find_or_declare(f)for f in self.env[CFG_FILES]]
+			for n in self.bldnode.ant_glob('**/*',excl='.lock* *conf_check_*/** config.log c4che/*',quiet=True):
+				if n in lst:
+					continue
+				n.delete()
+		self.root.children={}
+		for v in'node_deps task_sigs raw_deps'.split():
+			setattr(self,v,{})
+class ListContext(BuildContext):
+	'''lists the targets to execute'''
+	cmd='list'
+	def execute(self):
+		self.restore()
+		if not self.all_envs:
+			self.load_envs()
+		self.recurse([self.run_dir])
+		self.pre_build()
+		self.timer=Utils.Timer()
+		for g in self.groups:
+			for tg in g:
+				try:
+					f=tg.post
+				except AttributeError:
+					pass
+				else:
+					f()
+		try:
+			self.get_tgen_by_name('')
+		except Exception:
+			pass
+		lst=list(self.task_gen_cache_names.keys())
+		lst.sort()
+		for k in lst:
+			Logs.pprint('GREEN',k)
+class StepContext(BuildContext):
+	'''executes tasks in a step-by-step fashion, for debugging'''
+	cmd='step'
+	def __init__(self,**kw):
+		super(StepContext,self).__init__(**kw)
+		self.files=Options.options.files
+	def compile(self):
+		if not self.files:
+			Logs.warn('Add a pattern for the debug build, for example "waf step --files=main.c,app"')
+			BuildContext.compile(self)
+			return
+		targets=None
+		if self.targets and self.targets!='*':
+			targets=self.targets.split(',')
+		for g in self.groups:
+			for tg in g:
+				if targets and tg.name not in targets:
+					continue
+				try:
+					f=tg.post
+				except AttributeError:
+					pass
+				else:
+					f()
+			for pat in self.files.split(','):
+				matcher=self.get_matcher(pat)
+				for tg in g:
+					if isinstance(tg,Task.TaskBase):
+						lst=[tg]
+					else:
+						lst=tg.tasks
+					for tsk in lst:
+						do_exec=False
+						for node in getattr(tsk,'inputs',[]):
+							if matcher(node,output=False):
+								do_exec=True
+								break
+						for node in getattr(tsk,'outputs',[]):
+							if matcher(node,output=True):
+								do_exec=True
+								break
+						if do_exec:
+							ret=tsk.run()
+							Logs.info('%s -> exit %r'%(str(tsk),ret))
+	def get_matcher(self,pat):
+		inn=True
+		out=True
+		if pat.startswith('in:'):
+			out=False
+			pat=pat.replace('in:','')
+		elif pat.startswith('out:'):
+			inn=False
+			pat=pat.replace('out:','')
+		anode=self.root.find_node(pat)
+		pattern=None
+		if not anode:
+			if not pat.startswith('^'):
+				pat='^.+?%s'%pat
+			if not pat.endswith('$'):
+				pat='%s$'%pat
+			pattern=re.compile(pat)
+		def match(node,output):
+			if output==True and not out:
+				return False
+			if output==False and not inn:
+				return False
+			if anode:
+				return anode==node
+			else:
+				return pattern.match(node.abspath())
+		return match
+BuildContext.store=Utils.nogc(BuildContext.store)
+BuildContext.restore=Utils.nogc(BuildContext.restore)

File timezones/.waf-1.7.0-9334f7e963bee5410f4fa28728feffdd/waflib/Build.pyc

Binary file added.

File timezones/.waf-1.7.0-9334f7e963bee5410f4fa28728feffdd/waflib/ConfigSet.py

+#! /usr/bin/env python
+# encoding: utf-8
+# WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file
+
+import copy,re,os
+from waflib import Logs,Utils
+re_imp=re.compile('^(#)*?([^#=]*?)\ =\ (.*?)$',re.M)
+class ConfigSet(object):
+	__slots__=('table','parent')
+	def __init__(self,filename=None):
+		self.table={}
+		if filename:
+			self.load(filename)
+	def __contains__(self,key):
+		if key in self.table:return True
+		try:return self.parent.__contains__(key)
+		except AttributeError:return False
+	def keys(self):
+		keys=set()
+		cur=self
+		while cur:
+			keys.update(cur.table.keys())
+			cur=getattr(cur,'parent',None)
+		keys=list(keys)
+		keys.sort()
+		return keys
+	def __str__(self):
+		return"\n".join(["%r %r"%(x,self.__getitem__(x))for x in self.keys()])
+	def __getitem__(self,key):
+		try:
+			while 1:
+				x=self.table.get(key,None)
+				if not x is None:
+					return x
+				self=self.parent
+		except AttributeError:
+			return[]
+	def __setitem__(self,key,value):
+		self.table[key]=value
+	def __delitem__(self,key):
+		self[key]=[]
+	def __getattr__(self,name):
+		if name in self.__slots__:
+			return object.__getattr__(self,name)
+		else:
+			return self[name]
+	def __setattr__(self,name,value):
+		if name in self.__slots__:
+			object.__setattr__(self,name,value)
+		else:
+			self[name]=value
+	def __delattr__(self,name):
+		if name in self.__slots__:
+			object.__delattr__(self,name)
+		else:
+			del self[name]
+	def derive(self):
+		newenv=ConfigSet()
+		newenv.parent=self
+		return newenv
+	def detach(self):
+		tbl=self.get_merged_dict()
+		try:
+			delattr(self,'parent')
+		except AttributeError:
+			pass
+		else:
+			keys=tbl.keys()
+			for x in keys:
+				tbl[x]=copy.deepcopy(tbl[x])
+			self.table=tbl
+	def get_flat(self,key):
+		s=self[key]
+		if isinstance(s,str):return s
+		return' '.join(s)
+	def _get_list_value_for_modification(self,key):
+		try:
+			value=self.table[key]
+		except KeyError:
+			try:value=self.parent[key]
+			except AttributeError:value=[]
+			if isinstance(value,list):
+				value=value[:]
+			else:
+				value=[value]
+		else:
+			if not isinstance(value,list):
+				value=[value]
+		self.table[key]=value
+		return value
+	def append_value(self,var,val):
+		current_value=self._get_list_value_for_modification(var)
+		if isinstance(val,str):
+			val=[val]
+		current_value.extend(val)
+	def prepend_value(self,var,val):
+		if isinstance(val,str):
+			val=[val]
+		self.table[var]=val+self._get_list_value_for_modification(var)
+	def append_unique(self,var,val):
+		if isinstance(val,str):
+			val=[val]
+		current_value=self._get_list_value_for_modification(var)
+		for x in val:
+			if x not in current_value:
+				current_value.append(x)
+	def get_merged_dict(self):
+		table_list=[]
+		env=self
+		while 1:
+			table_list.insert(0,env.table)
+			try:env=env.parent
+			except AttributeError:break
+		merged_table={}
+		for table in table_list:
+			merged_table.update(table)
+		return merged_table
+	def store(self,filename):
+		try:
+			os.makedirs(os.path.split(filename)[0])
+		except OSError:
+			pass
+		f=None
+		try:
+			f=open(filename,'w')
+			merged_table=self.get_merged_dict()
+			keys=list(merged_table.keys())
+			keys.sort()
+			for k in keys:
+				if k!='undo_stack':
+					f.write('%s = %r\n'%(k,merged_table[k]))
+		finally:
+			if f:
+				f.close()
+	def load(self,filename):
+		tbl=self.table
+		code=Utils.readf(filename,m='rU')
+		for m in re_imp.finditer(code):
+			g=m.group
+			tbl[g(2)]=eval(g(3))
+		Logs.debug('env: %s'%str(self.table))
+	def update(self,d):
+		for k,v in d.items():
+			self[k]=v
+	def stash(self):
+		self.undo_stack=self.undo_stack+[self.table]
+		self.table=self.table.copy()
+	def revert(self):
+		self.table=self.undo_stack.pop(-1)

File timezones/.waf-1.7.0-9334f7e963bee5410f4fa28728feffdd/waflib/ConfigSet.pyc

Binary file added.

File timezones/.waf-1.7.0-9334f7e963bee5410f4fa28728feffdd/waflib/Configure.py

+#! /usr/bin/env python
+# encoding: utf-8
+# WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file
+
+import os,shlex,sys,time
+from waflib import ConfigSet,Utils,Options,Logs,Context,Build,Errors
+try:
+	from urllib import request
+except ImportError:
+	from urllib import urlopen
+else:
+	urlopen=request.urlopen
+BREAK='break'
+CONTINUE='continue'
+WAF_CONFIG_LOG='config.log'
+autoconfig=False
+conf_template='''# project %(app)s configured on %(now)s by
+# waf %(wafver)s (abi %(abi)s, python %(pyver)x on %(systype)s)
+# using %(args)s
+#'''
+def download_check(node):
+	pass
+def download_tool(tool,force=False,ctx=None):
+	for x in Utils.to_list(Context.remote_repo):
+		for sub in Utils.to_list(Context.remote_locs):
+			url='/'.join((x,sub,tool+'.py'))
+			try:
+				web=urlopen(url)
+				try:
+					if web.getcode()!=200:
+						continue
+				except AttributeError:
+					pass
+			except Exception:
+				continue
+			else:
+				tmp=ctx.root.make_node(os.sep.join((Context.waf_dir,'waflib','extras',tool+'.py')))
+				tmp.write(web.read())
+				Logs.warn('Downloaded %s from %s'%(tool,url))
+				download_check(tmp)
+				try:
+					module=Context.load_tool(tool)
+				except Exception:
+					Logs.warn('The tool %s from %s is unusable'%(tool,url))
+					try:
+						tmp.delete()
+					except Exception:
+						pass
+					continue
+				return module
+	raise Errors.WafError('Could not load the Waf tool')
+class ConfigurationContext(Context.Context):
+	'''configures the project'''
+	cmd='configure'
+	error_handlers=[]
+	def __init__(self,**kw):
+		super(ConfigurationContext,self).__init__(**kw)
+		self.environ=dict(os.environ)
+		self.all_envs={}
+		self.top_dir=None
+		self.out_dir=None
+		self.tools=[]
+		self.hash=0
+		self.files=[]
+		self.tool_cache=[]
+		self.setenv('')
+	def setenv(self,name,env=None):
+		if name not in self.all_envs or env:
+			if not env:
+				env=ConfigSet.ConfigSet()
+				self.prepare_env(env)
+			else:
+				env=env.derive()
+			self.all_envs[name]=env
+		self.variant=name
+	def get_env(self):
+		return self.all_envs[self.variant]
+	def set_env(self,val):
+		self.all_envs[self.variant]=val
+	env=property(get_env,set_env)
+	def init_dirs(self):
+		top=self.top_dir
+		if not top:
+			top=Options.options.top
+		if not top:
+			top=getattr(Context.g_module,Context.TOP,None)
+		if not top:
+			top=self.path.abspath()
+		top=os.path.abspath(top)
+		self.srcnode=(os.path.isabs(top)and self.root or self.path).find_dir(top)
+		assert(self.srcnode)
+		out=self.out_dir
+		if not out:
+			out=Options.options.out
+		if not out:
+			out=getattr(Context.g_module,Context.OUT,None)
+		if not out:
+			out=Options.lockfile.replace('.lock-waf_%s_'%sys.platform,'').replace('.lock-waf','')
+		self.bldnode=(os.path.isabs(out)and self.root or self.path).make_node(out)
+		self.bldnode.mkdir()
+		if not os.path.isdir(self.bldnode.abspath()):
+			conf.fatal('could not create the build directory %s'%self.bldnode.abspath())
+	def execute(self):
+		self.init_dirs()
+		self.cachedir=self.bldnode.make_node(Build.CACHE_DIR)
+		self.cachedir.mkdir()
+		path=os.path.join(self.bldnode.abspath(),WAF_CONFIG_LOG)
+		self.logger=Logs.make_logger(path,'cfg')
+		app=getattr(Context.g_module,'APPNAME','')
+		if app:
+			ver=getattr(Context.g_module,'VERSION','')
+			if ver:
+				app="%s (%s)"%(app,ver)
+		now=time.ctime()
+		pyver=sys.hexversion
+		systype=sys.platform
+		args=" ".join(sys.argv)
+		wafver=Context.WAFVERSION
+		abi=Context.ABI
+		self.to_log(conf_template%vars())
+		self.msg('Setting top to',self.srcnode.abspath())
+		self.msg('Setting out to',self.bldnode.abspath())
+		if id(self.srcnode)==id(self.bldnode):
+			Logs.warn('Setting top == out (remember to use "update_outputs")')
+		elif id(self.path)!=id(self.srcnode):
+			if self.srcnode.is_child_of(self.path):
+				Logs.warn('Are you certain that you do not want to set top="." ?')
+		super(ConfigurationContext,self).execute()
+		self.store()
+		Context.top_dir=self.srcnode.abspath()
+		Context.out_dir=self.bldnode.abspath()
+		env=ConfigSet.ConfigSet()
+		env['argv']=sys.argv
+		env['options']=Options.options.__dict__
+		env.run_dir=Context.run_dir
+		env.top_dir=Context.top_dir
+		env.out_dir=Context.out_dir
+		env['hash']=self.hash
+		env['files']=self.files
+		env['environ']=dict(self.environ)
+		if not self.env.NO_LOCK_IN_RUN:
+			env.store(Context.run_dir+os.sep+Options.lockfile)
+		if not self.env.NO_LOCK_IN_TOP:
+			env.store(Context.top_dir+os.sep+Options.lockfile)
+		if not self.env.NO_LOCK_IN_OUT:
+			env.store(Context.out_dir+os.sep+Options.lockfile)
+	def prepare_env(self,env):
+		if not env.PREFIX:
+			env.PREFIX=os.path.abspath(os.path.expanduser(Options.options.prefix))
+		if not env.BINDIR:
+			env.BINDIR=Utils.subst_vars('${PREFIX}/bin',env)
+		if not env.LIBDIR:
+			env.LIBDIR=Utils.subst_vars('${PREFIX}/lib',env)
+	def store(self):
+		n=self.cachedir.make_node('build.config.py')
+		n.write('version = 0x%x\ntools = %r\n'%(Context.HEXVERSION,self.tools))
+		if not self.all_envs:
+			self.fatal('nothing to store in the configuration context!')
+		for key in self.all_envs:
+			tmpenv=self.all_envs[key]
+			tmpenv.store(os.path.join(self.cachedir.abspath(),key+Build.CACHE_SUFFIX))
+	def load(self,input,tooldir=None,funs=None,download=True):
+		tools=Utils.to_list(input)
+		if tooldir:tooldir=Utils.to_list(tooldir)
+		for tool in tools:
+			mag=(tool,id(self.env),funs)
+			if mag in self.tool_cache:
+				self.to_log('(tool %s is already loaded, skipping)'%tool)
+				continue
+			self.tool_cache.append(mag)
+			module=None
+			try:
+				module=Context.load_tool(tool,tooldir)
+			except ImportError ,e:
+				if Options.options.download:
+					module=download_tool(tool,ctx=self)
+					if not module:
+						self.fatal('Could not load the Waf tool %r or download a suitable replacement from the repository (sys.path %r)\n%s'%(tool,sys.path,e))
+				else:
+					self.fatal('Could not load the Waf tool %r from %r (try the --download option?):\n%s'%(tool,sys.path,e))
+			except Exception ,e:
+				self.to_log('imp %r (%r & %r)'%(tool,tooldir,funs))
+				self.to_log(Utils.ex_stack())
+				raise
+			if funs is not None:
+				self.eval_rules(funs)
+			else:
+				func=getattr(module,'configure',None)
+				if func:
+					if type(func)is type(Utils.readf):func(self)
+					else:self.eval_rules(func)
+			self.tools.append({'tool':tool,'tooldir':tooldir,'funs':funs})
+	def post_recurse(self,node):
+		super(ConfigurationContext,self).post_recurse(node)
+		self.hash=hash((self.hash,node.read('rb')))
+		self.files.append(node.abspath())
+	def eval_rules(self,rules):
+		self.rules=Utils.to_list(rules)
+		for x in self.rules:
+			f=getattr(self,x)
+			if not f:self.fatal("No such method '%s'."%x)
+			try:
+				f()
+			except Exception ,e:
+				ret=self.err_handler(x,e)
+				if ret==BREAK:
+					break
+				elif ret==CONTINUE:
+					continue
+				else:
+					raise
+	def err_handler(self,fun,error):
+		pass
+def conf(f):
+	def fun(*k,**kw):
+		mandatory=True
+		if'mandatory'in kw:
+			mandatory=kw['mandatory']
+			del kw['mandatory']
+		try:
+			return f(*k,**kw)
+		except Errors.ConfigurationError:
+			if mandatory:
+				raise
+	setattr(ConfigurationContext,f.__name__,fun)
+	setattr(Build.BuildContext,f.__name__,fun)
+	return f
+@conf
+def add_os_flags(self,var,dest=None):
+	try:self.env.append_value(dest or var,shlex.split(self.environ[var]))
+	except KeyError:pass
+@conf
+def cmd_to_list(self,cmd):
+	if isinstance(cmd,str)and cmd.find(' '):
+		try:
+			os.stat(cmd)
+		except OSError:
+			return shlex.split(cmd)
+		else:
+			return[cmd]
+	return cmd
+@conf
+def check_waf_version(self,mini='1.6.99',maxi='1.8.0'):
+	self.start_msg('Checking for waf version in %s-%s'%(str(mini),str(maxi)))
+	ver=Context.HEXVERSION
+	if Utils.num2ver(mini)>ver:
+		self.fatal('waf version should be at least %r (%r found)'%(Utils.num2ver(mini),ver))
+	if Utils.num2ver(maxi)<ver:
+		self.fatal('waf version should be at most %r (%r found)'%(Utils.num2ver(maxi),ver))
+	self.end_msg('ok')
+@conf
+def find_file(self,filename,path_list=[]):
+	for n in Utils.to_list(filename):
+		for d in Utils.to_list(path_list):
+			p=os.path.join(d,n)
+			if os.path.exists(p):
+				return p
+	self.fatal('Could not find %r'%filename)
+@conf
+def find_program(self,filename,**kw):
+	exts=kw.get('exts',Utils.is_win32 and'.exe,.com,.bat,.cmd'or',.sh,.pl,.py')
+	environ=kw.get('environ',os.environ)
+	ret=''
+	filename=Utils.to_list(filename)
+	var=kw.get('var','')
+	if not var:
+		var=filename[0].upper()
+	if self.env[var]:
+		ret=self.env[var]
+	elif var in environ:
+		ret=environ[var]
+	path_list=kw.get('path_list','')
+	if not ret:
+		if path_list:
+			path_list=Utils.to_list(path_list)
+		else:
+			path_list=environ.get('PATH','').split(os.pathsep)
+		if not isinstance(filename,list):
+			filename=[filename]
+		for a in exts.split(','):
+			if ret:
+				break
+			for b in filename:
+				if ret:
+					break
+				for c in path_list:
+					if ret:
+						break
+					x=os.path.expanduser(os.path.join(c,b+a))
+					if os.path.isfile(x):
+						ret=x
+	if not ret and Utils.winreg:
+		ret=Utils.get_registry_app_path(Utils.winreg.HKEY_CURRENT_USER,filename)
+	if not ret and Utils.winreg:
+		ret=Utils.get_registry_app_path(Utils.winreg.HKEY_LOCAL_MACHINE,filename)
+	self.msg('Checking for program '+','.join(filename),ret or False)
+	self.to_log('find program=%r paths=%r var=%r -> %r'%(filename,path_list,var,ret))
+	if not ret:
+		self.fatal(kw.get('errmsg','')or'Could not find the program %s'%','.join(filename))
+	if var:
+		self.env[var]=ret
+	return ret
+@conf
+def find_perl_program(self,filename,path_list=[],var=None,environ=None,exts=''):
+	try:
+		app=self.find_program(filename,path_list=path_list,var=var,environ=environ,exts=exts)
+	except Exception:
+		self.find_program('perl',var='PERL')
+		app=self.find_file(filename,os.environ['PATH'].split(os.pathsep))
+		if not app:
+			raise
+		if var:
+			self.env[var]=Utils.to_list(self.env['PERL'])+[app]
+	self.msg('Checking for %r'%filename,app)

File timezones/.waf-1.7.0-9334f7e963bee5410f4fa28728feffdd/waflib/Configure.pyc

Binary file added.

File timezones/.waf-1.7.0-9334f7e963bee5410f4fa28728feffdd/waflib/Context.py

+#! /usr/bin/env python
+# encoding: utf-8
+# WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file
+
+import os,imp,sys
+from waflib import Utils,Errors,Logs
+import waflib.Node
+HEXVERSION=0x1070000
+WAFVERSION="1.7.0"
+WAFREVISION="a7e69d6b81b04729804754c4d5214da063779a65"
+ABI=98
+DBFILE='.wafpickle-%d'%ABI
+APPNAME='APPNAME'
+VERSION='VERSION'
+TOP='top'
+OUT='out'
+WSCRIPT_FILE='wscript'
+launch_dir=''
+run_dir=''
+top_dir=''
+out_dir=''
+waf_dir=''
+local_repo=''
+remote_repo='http://waf.googlecode.com/git/'
+remote_locs=['waflib/extras','waflib/Tools']
+g_module=None
+STDOUT=1
+STDERR=-1
+BOTH=0
+classes=[]
+def create_context(cmd_name,*k,**kw):
+	global classes
+	for x in classes:
+		if x.cmd==cmd_name:
+			return x(*k,**kw)
+	ctx=Context(*k,**kw)
+	ctx.fun=cmd_name
+	return ctx
+class store_context(type):
+	def __init__(cls,name,bases,dict):
+		super(store_context,cls).__init__(name,bases,dict)
+		name=cls.__name__
+		if name=='ctx'or name=='Context':
+			return
+		try:
+			cls.cmd
+		except AttributeError:
+			raise Errors.WafError('Missing command for the context class %r (cmd)'%name)
+		if not getattr(cls,'fun',None):
+			cls.fun=cls.cmd
+		global classes
+		classes.insert(0,cls)
+ctx=store_context('ctx',(object,),{})
+class Context(ctx):
+	errors=Errors
+	tools={}
+	def __init__(self,**kw):
+		try:
+			rd=kw['run_dir']
+		except KeyError:
+			global run_dir
+			rd=run_dir
+		class node_class(waflib.Node.Node):
+			pass
+		self.node_class=node_class
+		self.node_class.__module__="waflib.Node"
+		self.node_class.__name__="Nod3"
+		self.node_class.ctx=self
+		self.root=self.node_class('',None)
+		self.cur_script=None
+		self.path=self.root.find_dir(rd)
+		self.stack_path=[]
+		self.exec_dict={'ctx':self,'conf':self,'bld':self,'opt':self}
+		self.logger=None
+	def __hash__(self):
+		return id(self)
+	def load(self,tool_list,*k,**kw):
+		tools=Utils.to_list(tool_list)
+		path=Utils.to_list(kw.get('tooldir',''))
+		for t in tools:
+			module=load_tool(t,path)
+			fun=getattr(module,kw.get('name',self.fun),None)
+			if fun:
+				fun(self)
+	def execute(self):
+		global g_module
+		self.recurse([os.path.dirname(g_module.root_path)])
+	def pre_recurse(self,node):
+		self.stack_path.append(self.cur_script)
+		self.cur_script=node
+		self.path=node.parent
+	def post_recurse(self,node):
+		self.cur_script=self.stack_path.pop()
+		if self.cur_script:
+			self.path=self.cur_script.parent
+	def recurse(self,dirs,name=None,mandatory=True,once=True):
+		try:
+			cache=self.recurse_cache
+		except AttributeError:
+			cache=self.recurse_cache={}
+		for d in Utils.to_list(dirs):
+			if not os.path.isabs(d):
+				d=os.path.join(self.path.abspath(),d)
+			WSCRIPT=os.path.join(d,WSCRIPT_FILE)
+			WSCRIPT_FUN=WSCRIPT+'_'+(name or self.fun)
+			node=self.root.find_node(WSCRIPT_FUN)
+			if node and(not once or node not in cache):
+				cache[node]=True
+				self.pre_recurse(node)
+				try:
+					function_code=node.read('rU')
+					exec(compile(function_code,node.abspath(),'exec'),self.exec_dict)
+				finally:
+					self.post_recurse(node)
+			elif not node:
+				node=self.root.find_node(WSCRIPT)
+				tup=(node,name or self.fun)
+				if node and(not once or tup not in cache):
+					cache[tup]=True
+					self.pre_recurse(node)
+					try:
+						wscript_module=load_module(node.abspath())
+						user_function=getattr(wscript_module,(name or self.fun),None)
+						if not user_function:
+							if not mandatory:
+								continue
+							raise Errors.WafError('No function %s defined in %s'%(name or self.fun,node.abspath()))
+						user_function(self)
+					finally:
+						self.post_recurse(node)
+				elif not node:
+					if not mandatory:
+						continue
+					raise Errors.WafError('No wscript file in directory %s'%d)
+	def exec_command(self,cmd,**kw):
+		subprocess=Utils.subprocess
+		kw['shell']=isinstance(cmd,str)
+		Logs.debug('runner: %r'%cmd)
+		Logs.debug('runner_env: kw=%s'%kw)
+		if self.logger:
+			self.logger.info(cmd)
+		if'stdout'not in kw:
+			kw['stdout']=subprocess.PIPE
+		if'stderr'not in kw:
+			kw['stderr']=subprocess.PIPE
+		try:
+			if kw['stdout']or kw['stderr']:
+				p=subprocess.Popen(cmd,**kw)
+				(out,err)=p.communicate()
+				ret=p.returncode
+			else:
+				out,err=(None,None)
+				ret=subprocess.Popen(cmd,**kw).wait()
+		except Exception ,e:
+			raise Errors.WafError('Execution failure: %s'%str(e),ex=e)
+		if out:
+			if not isinstance(out,str):
+				out=out.decode(sys.stdout.encoding or'iso8859-1')
+			if self.logger:
+				self.logger.debug('out: %s'%out)
+			else:
+				sys.stdout.write(out)
+		if err:
+			if not isinstance(err,str):
+				err=err.decode(sys.stdout.encoding or'iso8859-1')
+			if self.logger:
+				self.logger.error('err: %s'%err)
+			else:
+				sys.stderr.write(err)
+		return ret
+	def cmd_and_log(self,cmd,**kw):
+		subprocess=Utils.subprocess
+		kw['shell']=isinstance(cmd,str)
+		Logs.debug('runner: %r'%cmd)
+		if'quiet'in kw:
+			quiet=kw['quiet']
+			del kw['quiet']
+		else:
+			quiet=None
+		if'output'in kw:
+			to_ret=kw['output']
+			del kw['output']
+		else:
+			to_ret=STDOUT
+		kw['stdout']=kw['stderr']=subprocess.PIPE
+		if quiet is None:
+			self.to_log(cmd)
+		try:
+			p=subprocess.Popen(cmd,**kw)
+			(out,err)=p.communicate()
+		except Exception ,e:
+			raise Errors.WafError('Execution failure: %s'%str(e),ex=e)
+		if not isinstance(out,str):
+			out=out.decode(sys.stdout.encoding or'iso8859-1')
+		if not isinstance(err,str):
+			err=err.decode(sys.stdout.encoding or'iso8859-1')
+		if out and quiet!=STDOUT and quiet!=BOTH:
+			self.to_log('out: %s'%out)
+		if err and quiet!=STDERR and quiet!=BOTH:
+			self.to_log('err: %s'%err)
+		if p.returncode:
+			e=Errors.WafError('Command %r returned %r'%(cmd,p.returncode))
+			e.returncode=p.returncode
+			e.stderr=err
+			e.stdout=out
+			raise e
+		if to_ret==BOTH:
+			return(out,err)
+		elif to_ret==STDERR:
+			return err
+		return out
+	def fatal(self,msg,ex=None):
+		if self.logger:
+			self.logger.info('from %s: %s'%(self.path.abspath(),msg))
+		try:
+			msg='%s\n(complete log in %s)'%(msg,self.logger.handlers[0].baseFilename)
+		except Exception:
+			pass
+		raise self.errors.ConfigurationError(msg,ex=ex)
+	def to_log(self,msg):
+		if not msg:
+			return
+		if self.logger:
+			self.logger.info(msg)
+		else:
+			sys.stderr.write(str(msg))
+			sys.stderr.flush()
+	def msg(self,msg,result,color=None):
+		self.start_msg(msg)
+		if not isinstance(color,str):
+			color=result and'GREEN'or'YELLOW'
+		self.end_msg(result,color)
+	def start_msg(self,msg):
+		try:
+			if self.in_msg:
+				self.in_msg+=1
+				return
+		except AttributeError:
+			self.in_msg=0
+		self.in_msg+=1
+		try:
+			self.line_just=max(self.line_just,len(msg))
+		except AttributeError:
+			self.line_just=max(40,len(msg))
+		for x in(self.line_just*'-',msg):
+			self.to_log(x)
+		Logs.pprint('NORMAL',"%s :"%msg.ljust(self.line_just),sep='')
+	def end_msg(self,result,color=None):
+		self.in_msg-=1
+		if self.in_msg:
+			return
+		defcolor='GREEN'
+		if result==True:
+			msg='ok'
+		elif result==False:
+			msg='not found'
+			defcolor='YELLOW'
+		else:
+			msg=str(result)
+		self.to_log(msg)
+		Logs.pprint(color or defcolor,msg)
+	def load_special_tools(self,var,ban=[]):
+		global waf_dir
+		lst=self.root.find_node(waf_dir).find_node('waflib/extras').ant_glob(var)
+		for x in lst:
+			if not x.name in ban:
+				load_tool(x.name.replace('.py',''))
+cache_modules={}
+def load_module(path):
+	try:
+		return cache_modules[path]
+	except KeyError:
+		pass
+	module=imp.new_module(WSCRIPT_FILE)
+	try:
+		code=Utils.readf(path,m='rU')
+	except(IOError,OSError):
+		raise Errors.WafError('Could not read the file %r'%path)
+	module_dir=os.path.dirname(path)
+	sys.path.insert(0,module_dir)
+	exec(compile(code,path,'exec'),module.__dict__)
+	sys.path.remove(module_dir)
+	cache_modules[path]=module
+	return module
+def load_tool(tool,tooldir=None):
+	if tool=='java':
+		tool='javaw'
+	elif tool=='compiler_cc':
+		tool='compiler_c'
+	else:
+		tool=tool.replace('++','xx')
+	if tooldir:
+		assert isinstance(tooldir,list)
+		sys.path=tooldir+sys.path
+		try:
+			__import__(tool)
+			ret=sys.modules[tool]
+			Context.tools[tool]=ret
+			return ret
+		finally:
+			for d in tooldir:
+				sys.path.remove(d)
+	else:
+		global waf_dir
+		try:
+			os.stat(os.path.join(waf_dir,'waflib','extras',tool+'.py'))
+		except OSError:
+			try:
+				os.stat(os.path.join(waf_dir,'waflib','Tools',tool+'.py'))
+			except OSError:
+				d=tool
+			else:
+				d='waflib.Tools.%s'%tool
+		else:
+			d='waflib.extras.%s'%tool
+		__import__(d)
+		ret=sys.modules[d]
+		Context.tools[tool]=ret
+		return ret

File timezones/.waf-1.7.0-9334f7e963bee5410f4fa28728feffdd/waflib/Context.pyc

Binary file added.