2
0
mirror of https://gitlab.com/ita1024/waf.git synced 2024-11-24 18:59:39 +01:00

Python 3 syntax cleanup

This commit is contained in:
Thomas Nagy 2015-09-28 21:44:50 +02:00
parent 1205f92a7f
commit f45e5c9d6e
No known key found for this signature in database
GPG Key ID: 67A565EDFDF90E64
6 changed files with 12 additions and 42 deletions

View File

@ -53,7 +53,7 @@ class fakecc(Task.Task):
bnodes = self.outputs
m = usemodule(self.inputs[0])
if m:
print "%s requires module %s" % (self.inputs[0].abspath(), m[0])
print("%s requires module %s" % (self.inputs[0].abspath(), m[0]))
#bnodes.append(self.generator.bld.bldnode.exclusive_build_node(m[0]))
compile(self)

View File

@ -183,38 +183,6 @@ def make_size_table(self):
return tbl
if 0:
val = str(int(1.6 * int(m.group(2))))
if m.group(1) == 'width':
w = val
h = "800"
else:
w = "800"
h = val
if ext == 'eps':
code = '-geometry %sx%s' % (w, h)
elif ext == 'dia':
if m.group(1) == 'width':
h = ''
else:
w = ''
code = '--size %sx%s' % (w, h)
elif ext == 'semd':
if m.group(1) == 'width':
code = '--width=%s' % w
else:
code = '--height=%s' % h
else:
code = '-Gsize="%s,%s"' % (w, h)
break
else:
return ([], '')
return ([], code)
"""
For vim highlighting:
cp vim/syntax/asciidoc.vim /usr/share/vim/site/syntax/

View File

@ -134,7 +134,7 @@ from waflib.Task import Task
Task.__dict__['post_run'].__doc__ = "Update the cache files (executed by threads). Override in subclasses."
from waflib import Configure, Build
from waflib import Configure, Build, Errors
confmeths = []
def conf(f):
def fun(*k, **kw):

View File

@ -2,6 +2,8 @@
# encoding: utf-8
# Thomas Nagy, 2011 (ita)
import sys
def options(opt):
opt.load('compiler_c')

View File

@ -26,10 +26,10 @@ if not os.path.exists(filename):
length = os.stat(filename).st_size
print "Content-Type: application/octet-stream"
print "Content-Disposition: attachment; filename=f.bin"
print "Content-length: %s" % length
print ""
print("Content-Type: application/octet-stream")
print("Content-Disposition: attachment; filename=f.bin")
print("Content-length: %s" % length)
print("")
with open(filename, 'rb') as f:
while True:

View File

@ -21,8 +21,8 @@ distnet.packages.debug = 0
distnet.packages.constraints = distnet.packages.local_resolve(text)
results = distnet.packages.get_results()
print "Content-Type: text/plain"
print ""
print ""
print results
print("Content-Type: text/plain")
print( "")
print("")
print(results)