Skip to content
Open
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions Bundle-Debian/setup_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
deps += re.sub(versions_re, ' ', line)
elif re.search(build_deps_re, line):
in_deps = True

deps += re.sub(build_deps_re, '', re.sub(versions_re, ' ', line))

if in_deps and not re.search(continues_re, line):
Expand All @@ -37,6 +36,6 @@
if len(arg) > 0:
cleanargs.append(arg)

print ' '.join(cleanargs)
print(' '.join(cleanargs))

subprocess.call(cleanargs)
30 changes: 15 additions & 15 deletions Bundle-Mac/buildDMG.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@
import argparse
import build_tools

#Most of the script is ripped out of the old jenkins.py from Bundle-Mac.
#Most of the script is ripped out of the old jenkins.py from Bundle-Mac.
#It peforms the subset of duties for packageing the already built libraries.

def add_platform_args(args):
arg_parser = argparse.ArgumentParser(
description='Script to create mac packages',
parents=[build_tools.get_parent_parser()])

arg_parser.add_argument('--no-digitizer',
action='store_true',
help='disable digitizer in build (only works on mac os)')
Expand All @@ -38,7 +38,7 @@ def change_sym(lib_path, sym_dest, bin_filename):
subprocess.check_call(['install_name_tool', '-change',
lib_path, sym_dest, bin_filename])
except subprocess.CalledProcessError as e:
print 'Error changing install name:' + str(e)
print("Error changing install name: %s" % e)
raise

def change_id(bin_dest, bin_filename):
Expand All @@ -48,7 +48,7 @@ def change_id(bin_dest, bin_filename):
try:
subprocess.check_call(['install_name_tool', '-id', bin_dest, bin_filename])
except subprocess.CalledProcessError as e:
print 'Error changing install name:' + str(e)
print("Error changing install name: %s" % e)
raise

binmatch = re.compile('(Mach-O 64-bit executable x86_64|Mach-O 64-bit dynamically linked shared library x86_64)')
Expand Down Expand Up @@ -139,7 +139,7 @@ def fix_lib_paths(fake_root, old_lib_paths):
binaries = []

for binary in these_bins:
print "Fixing binary " + binary
print("Fixing binary %s" % binary)
for old_lib_path in old_lib_paths:
binaries += fix_binary(binary, old_lib_path, fake_root,
os.path.join(fake_root, new_lib_path),
Expand Down Expand Up @@ -187,10 +187,10 @@ def make_installer(package_dir, resources_dir, distribution_xml, outfile):
'--resources', resources_dir,
outfile])
except OSError as e:
print 'productbuild not found: ' + str(e)
print("productbuild not found: %s" % e)
raise
except subprocess.CalledProcessError as e:
print 'productbuild failed: ' + str(e)
print("productbuild failed: %s" % e)
sys.exit(e.returncode)

return outfile
Expand All @@ -207,10 +207,10 @@ def make_uninstaller(workspace, outfile, resources_dir, scripts_dir):
outfile])

except OSError as e:
print 'pkgbuild not found: ' + str(e)
print("pkgbuild not found: %s" % e)
raise
except subprocess.CalledProcessError as e:
print 'pkgbuild failed: ' + str(e)
print("pkgbuild failed: %s" % e)
sys.exit(e.returncode)

return outfile
Expand Down Expand Up @@ -265,10 +265,10 @@ def make_dmg(workspace, package_dir, pkgname, version, resources_dir, no_digitiz
'-ov', '-volname', pkgname,
'-fs', 'HFS+',
'-srcfolder', dmg_root]
print " ".join(cmd)
print(" ".join(cmd))
subprocess.check_call(cmd)
except subprocess.CalledProcessError as e:
print 'hdiutil create failed: ' + str(e)
print("hdiutil create failed: %s" % e)
sys.exit(e.returncode)

final_dmg = os.path.join(workspace, versioned_name + '.dmg')
Expand All @@ -280,7 +280,7 @@ def make_dmg(workspace, package_dir, pkgname, version, resources_dir, no_digitiz
'-format', 'UDZO',
'-o', final_dmg])
except subprocess.CalledProcessError as e:
print 'udiutil convert failed: ' + str(e)
print("udiutil convert failed: %s" % e)
sys.exit(e.returncode)

#shutil.rmtree(variant_dir)
Expand Down Expand Up @@ -325,14 +325,14 @@ def make_packages(package_dir,
core_pkg])

except OSError as e:
print 'pkgbuild not found: ' + str(e)
print("pkgbuild not found: %s" % e)
raise
except subprocess.CalledProcessError as e:
print 'pkgbuild failed: ' + str(e)
print("pkgbuild failed: %s" % e)
sys.exit(e.returncode)

def run(workspace, fake_root, version,additional_args=[]):
print("running buildDMG")
print("running buildDMG")
#arguments = add_platform_args(additional_args)
print('Copying EULA')
shutil.copy(os.path.join(workspace,'Legal','EULA.txt'),
Expand Down
69 changes: 0 additions & 69 deletions Bundle-Mac/glue_qt.py

This file was deleted.

24 changes: 12 additions & 12 deletions Bundle-Mac/jenkins.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def change_sym(lib_path, sym_dest, bin_filename):
subprocess.check_call(['install_name_tool', '-change',
lib_path, sym_dest, bin_filename])
except subprocess.CalledProcessError as e:
print 'Error changing install name:' + str(e)
print("Error changing install name: %s" % e)
raise


Expand All @@ -45,7 +45,7 @@ def change_id(bin_dest, bin_filename):
bin_dest,
bin_filename])
except subprocess.CalledProcessError as e:
print 'Error changing install name:' + str(e)
print("Error changing install name: %s" % e)
raise


Expand Down Expand Up @@ -141,7 +141,7 @@ def fix_lib_paths(fake_root, old_lib_paths):
binaries = []

for binary in these_bins:
print "Fixing binary " + binary
print("Fixing binary %s" % binary)
for old_lib_path in old_lib_paths:
binaries += fix_binary(binary, old_lib_path, fake_root,
os.path.join(fake_root, new_lib_path),
Expand Down Expand Up @@ -203,10 +203,10 @@ def make_uninstaller(workspace, outfile, resources_dir, scripts_dir):
outfile])

except OSError as e:
print 'pkgbuild not found: ' + str(e)
print("pkgbuild not found: %s" % e)
return build_tools.builders.FAILURE
except subprocess.CalledProcessError as e:
print 'pkgbuild failed: ' + str(e)
print("pkgbuild failed: %s" % e)
return build_tools.builders.FAILURE

return build_tools.builders.SUCCESS
Expand Down Expand Up @@ -256,10 +256,10 @@ def make_packages(package_dir,
core_pkg])

except OSError as e:
print 'pkgbuild not found: ' + str(e)
print("pkgbuild not found: %s" % e)
return build_tools.builders.FAILURE
except subprocess.CalledProcessError as e:
print 'pkgbuild failed: ' + str(e)
print("pkgbuild failed: " % e)
return build_tools.builders.FAILURE

return build_tools.builders.SUCCESS
Expand All @@ -274,10 +274,10 @@ def make_installer(package_dir, resources_dir, distribution_xml, outfile):
'--resources', resources_dir,
outfile])
except OSError as e:
print 'productbuild not found: ' + str(e)
print("productbuild not found: %s" % e)
return build_tools.builders.FAILURE
except subprocess.CalledProcessError as e:
print 'productbuild failed: ' + str(e)
print("productbuild failed: %s" % e)
return build_tools.builders.FAILURE

return build_tools.builders.SUCCESS
Expand Down Expand Up @@ -355,10 +355,10 @@ def make_dmg(
# http://apple.stackexchange.com/questions/156994
'-megabytes', '400']

print " ".join(cmd)
print(" ".join(cmd))
subprocess.check_call(cmd)
except subprocess.CalledProcessError as e:
print 'hdiutil create failed: ' + str(e)
print("hdiutil create failed: %s" % e)
return build_tools.builders.FAILURE

final_dmg = os.path.join(workspace, versioned_name + '.dmg')
Expand All @@ -370,7 +370,7 @@ def make_dmg(
'-format', 'UDZO',
'-o', final_dmg])
except subprocess.CalledProcessError as e:
print 'udiutil convert failed: ' + str(e)
print("udiutil convert failed: %s" % e)
return build_tools.builders.FAILURE

shutil.rmtree(variant_dir)
Expand Down
2 changes: 1 addition & 1 deletion Bundle-Mac/sign_install_dmg.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
dmg_size = os.path.getsize(orig_dmg) >> 20
# add a few MB of buffer
dmg_size += 10
print ("DMG size: ", dmg_size)
print("DMG size: %s" % dmg_size)

hdiutil = subprocess.Popen(["hdiutil", "attach", orig_dmg],
stdout=subprocess.PIPE)
Expand Down
4 changes: 2 additions & 2 deletions Bundle-Redhat/installRPMS.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
installed.append(pkgname)
args = ['sudo', 'rpm', '-Uvh']
args.extend(tprpms)
print ' '.join(args)
print(" ".join(args))
subprocess.check_call(args)
finally:
print(installed)
print(installed)
2 changes: 1 addition & 1 deletion Bundle-Redhat/sign_rpms.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
rpmdirs[root] = 1
if len(sys.argv) > 5:
if sys.argv[5]=='-nosign':
print "not signing"
print("not signing")
else:
cmd = ['rpm', '--addsign']
cmd.extend(rpms)
Expand Down
10 changes: 5 additions & 5 deletions Bundle-Win/jenkins.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@


def zip_argo_driver(argo_driver_folder, zipname):
print "Creating zip of Argo driver"
print("Creating zip of Argo driver")
argo_zip = zipfile.ZipFile(zipname, 'w')
for root, dirs, files in os.walk(argo_driver_folder):
for file in files:
path = os.path.join(root, file)
path_minus_argo_root = path[len(argo_driver_folder)+1:]
print " Writing " + path_minus_argo_root + " to " + zipname
print("Writing %s to %s" % (path_minus_argo_root, zipname)
argo_zip.write(path, path_minus_argo_root)
argo_zip.close()

Expand All @@ -33,7 +33,7 @@ def make_installer(workspace, env, version, is_win64, argo):
if not os.path.exists(nsis_exe):
nsis_exe = 'C:\\Program Files (x86)\\NSIS\\makensis.exe'
if not os.path.exists(nsis_exe):
print 'No NSIS detected. failing'
print("No NSIS detected. failing")
return build_tools.builders.FAILURE

nsis_script = os.path.join(workspace, 'Bundle-Win', 'makerbot.nsi')
Expand All @@ -55,11 +55,11 @@ def make_installer(workspace, env, version, is_win64, argo):
'/DARGO=true',
'/DARGO_ROOT=' + build_tools.source_list.argo_v3driver.dir]
nsis_command += [nsis_script]
print ' '.join(nsis_command)
print(" ".join(nsis_command))
try:
subprocess.check_call(nsis_command, env=env, stdout=sys.stdout)
except subprocess.CalledProcessError as e:
print 'nsis script failed: ' + str(e)
print("nsis script failed: %s" % e)
return build_tools.builders.FAILURE

return build_tools.builders.SUCCESS
Expand Down
2 changes: 1 addition & 1 deletion Bundle-Win/sign_installer.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
os.environ['PATH'] += ';c:\\Program Files\\Microsoft SDKs\\Windows\\v7.1\\Bin'
os.environ['PATH'] += ';c:\\Program Files (x86)\\Windows Kits\\8.1\\bin\\x86'

print os.environ['PATH']
print(os.environ['PATH'])
subprocess.call(['signtool', 'sign', '/a', '/t', 'http://timestamp.digicert.com',
sys.argv[1]])
Loading