3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-12 04:03:39 +00:00

Python 3.x issues

This commit is contained in:
Christoph M. Wintersteiger 2015-10-28 22:40:07 +00:00
parent ced04bc15c
commit eb28ee8999
3 changed files with 15 additions and 15 deletions

View file

@ -50,7 +50,7 @@ def add_missing_cr(dir):
if f.endswith('.cpp') or f.endswith('.h') or f.endswith('.c') or f.endswith('.cs'): if f.endswith('.cpp') or f.endswith('.h') or f.endswith('.c') or f.endswith('.cs'):
path = "%s\\%s" % (root, f) path = "%s\\%s" % (root, f)
if not has_cr(path): if not has_cr(path):
print "Missing CR for %s" % path print("Missing CR for %s" % path)
add_cr(path) add_cr(path)
add_missing_cr('src') add_missing_cr('src')

View file

@ -42,16 +42,16 @@ def set_build_dir(path):
mk_dir(BUILD_DIR) mk_dir(BUILD_DIR)
def display_help(): def display_help():
print "mk_unix_dist.py: Z3 Linux/OSX/BSD distribution generator\n" print("mk_unix_dist.py: Z3 Linux/OSX/BSD distribution generator\n")
print "This script generates the zip files containing executables, shared objects, header files for Linux/OSX/BSD." print("This script generates the zip files containing executables, shared objects, header files for Linux/OSX/BSD.")
print "It must be executed from the Z3 root directory." print("It must be executed from the Z3 root directory.")
print "\nOptions:" print("\nOptions:")
print " -h, --help display this message." print(" -h, --help display this message.")
print " -s, --silent do not print verbose messages." print(" -s, --silent do not print verbose messages.")
print " -b <sudir>, --build=<subdir> subdirectory where x86 and x64 Z3 versions will be built (default: build-dist)." print(" -b <sudir>, --build=<subdir> subdirectory where x86 and x64 Z3 versions will be built (default: build-dist).")
print " -f, --force force script to regenerate Makefiles." print(" -f, --force force script to regenerate Makefiles.")
print " --nojava do not include Java bindings in the binary distribution files." print(" --nojava do not include Java bindings in the binary distribution files.")
print " --githash include git hash in the Zip file." print(" --githash include git hash in the Zip file.")
exit(0) exit(0)
# Parse configuration option for mk_make script # Parse configuration option for mk_make script
@ -169,7 +169,7 @@ def mk_dist_dir():
mk_util.JAVA_ENABLED = JAVA_ENABLED mk_util.JAVA_ENABLED = JAVA_ENABLED
mk_unix_dist(build_path, dist_path) mk_unix_dist(build_path, dist_path)
if is_verbose(): if is_verbose():
print "Generated distribution folder at '%s'" % dist_path print("Generated distribution folder at '%s'" % dist_path)
ZIPOUT = None ZIPOUT = None
@ -193,7 +193,7 @@ def mk_zip():
ZIPOUT = zipfile.ZipFile(zfname, 'w', zipfile.ZIP_DEFLATED) ZIPOUT = zipfile.ZipFile(zfname, 'w', zipfile.ZIP_DEFLATED)
os.path.walk(dist_path, mk_zip_visitor, '*') os.path.walk(dist_path, mk_zip_visitor, '*')
if is_verbose(): if is_verbose():
print "Generated '%s'" % zfname print("Generated '%s'" % zfname)
except: except:
pass pass
ZIPOUT = None ZIPOUT = None

View file

@ -10,7 +10,7 @@ endif = re.compile("#endif /\* \_(.*)\_H\_")
def fix_hdr(file): def fix_hdr(file):
print file print(file)
tmp = "%s.tmp" % file tmp = "%s.tmp" % file
ins = open(file) ins = open(file)
ous = open(tmp,'w') ous = open(tmp,'w')
@ -29,7 +29,7 @@ def fix_hdr(file):
continue continue
m = ifndef.search(line) m = ifndef.search(line)
if m: if m:
print m.group(1) print(m.group(1))
ous.write("#ifndef ") ous.write("#ifndef ")
ous.write(m.group(1)) ous.write(m.group(1))
ous.write("_H_\n") ous.write("_H_\n")