Revision: 3855 http://geany.svn.sourceforge.net/geany/?rev=3855&view=rev Author: eht16 Date: 2009-06-11 09:01:11 +0000 (Thu, 11 Jun 2009)
Log Message: ----------- Update Waf to 1.5.7.
Modified Paths: -------------- trunk/ChangeLog trunk/waf
Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2009-06-10 20:36:21 UTC (rev 3854) +++ trunk/ChangeLog 2009-06-11 09:01:11 UTC (rev 3855) @@ -1,3 +1,9 @@ +2009-06-11 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de> + + * waf: + Update Waf to 1.5.7. + + 2009-06-10 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* src/editor.c:
Modified: trunk/waf =================================================================== --- trunk/waf 2009-06-10 20:36:21 UTC (rev 3854) +++ trunk/waf 2009-06-11 09:01:11 UTC (rev 3855) @@ -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.7" +REVISION="8edda22ed216daab7aed3d430dc291cf" +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) @@ -75,13 +84,25 @@ t.write(txt) t.close()
- t = tarfile.open(tmp) - for x in t: t.extract(x) - t.close() + try: + t = tarfile.open(tmp) + for x in t: t.extract(x) + t.close() + except: + os.chdir(cwd) + try: shutil.rmtree(dir) + except OSError: pass + err("Waf cannot be unpacked, check that bzip2 support is present")
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 +123,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 +146,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.