Revision: 615 http://geany-plugins.svn.sourceforge.net/geany-plugins/?rev=615&view=rev Author: dmaphy Date: 2009-05-01 19:06:56 +0000 (Fri, 01 May 2009)
Log Message: ----------- update waf to 1.5.5
Modified Paths: -------------- trunk/waf
Modified: trunk/waf =================================================================== --- trunk/waf 2009-04-29 18:24:39 UTC (rev 614) +++ trunk/waf 2009-05-01 19:06:56 UTC (rev 615) @@ -31,22 +31,31 @@ """
import os, sys -if sys.hexversion<0x203000f: raise "Waf requires Python >= 2.3" +if sys.hexversion<0x203000f: raise ImportError("Waf requires Python >= 2.3")
if 'PSYCOWAF' in os.environ: try:import psyco;psyco.full() except:pass
-VERSION="1.5.3" -REVISION="acc5828c66ed33800741f39f185080dd" -INSTALL=sys.platform=='win32' and 'c:/temp' or '/usr/local' -C1='#(' -C2='#&' +VERSION="1.5.5" +REVISION="b91f640ab0e4cd8b0bd40eb6200616f4" +INSTALL='' +C1='#,' +C2='#$' cwd = os.getcwd() join = os.path.join
+WAF='waf' +def b(x): + return x + +if sys.hexversion>0x300000f: + WAF='waf3' + def b(x): + return x.encode() + def err(m): - print ('\033[91mError: %s\033[0m' % m) + print(('\033[91mError: %s\033[0m' % m)) sys.exit(1)
def unpack_wafdir(dir): @@ -55,13 +64,13 @@ while 1: line = f.readline() if not line: err("run waf-light from a folder containing wafadmin") - if line == '#==>\n': + if line == b('#==>\n'): txt = f.readline() if not txt: err(c % 1) - if f.readline()!='#<==\n': err(c % 2) + if f.readline()!=b('#<==\n'): err(c % 2) break if not txt: err(c % 3) - txt = txt[1:-1].replace(C1, '\n').replace(C2, '\r') + txt = txt[1:-1].replace(b(C1), b('\n')).replace(b(C2), b('\r'))
import shutil, tarfile try: shutil.rmtree(dir) @@ -82,6 +91,12 @@ os.chmod(join('wafadmin','Tools'), 493)
os.unlink(tmp) + + if sys.hexversion>0x300000f: + sys.path = [join(dir, 'wafadmin')] + sys.path + import py3kfixes + py3kfixes.fixdir(dir) + os.chdir(cwd)
def test(dir): @@ -102,15 +117,15 @@ if w: return w err("waf-light requires wafadmin -> export WAFDIR=/folder")
- dir = "/lib/waf-%s-%s/" % (VERSION, REVISION) + dir = "/lib/%s-%s-%s/" % (WAF, VERSION, REVISION) for i in [INSTALL,'/usr','/usr/local','/opt']: w = test(i+dir) if w: return w
#waf-local - s = '.waf-%s-%s' + s = '.%s-%s-%s' if sys.platform == 'win32': s = s[1:] - dir = join(base, s % (VERSION, REVISION)) + dir = join(base, s % (WAF, VERSION, REVISION)) w = test(dir) if w: return w
@@ -125,7 +140,8 @@
import Scripting Scripting.prepare(t, cwd, VERSION, wafdir) +sys.exit(0)
#==>
@@ Diff output truncated at 100000 characters. @@
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.