current_directory=os.path.dirname(os.path.abspath(__file__))
-def __init(envAcc={}, paraview_version=None, use_pleiade_mirrors=False):
+def __init(envAcc={}, paraview_version=None, use_pleiade_mirrors=False, nb_jobs=None):
# Read configuration
filename=os.path.join(current_directory, "SalomeMiniConfig.cfg")
config=read_config_file(filename)
config["use_pleiade_mirrors"] = use_pleiade_mirrors
#update_config_file(filename, {"use_pleiade_mirrors": "yes"})
pass
+ if nb_jobs:
+ config["make_nb_jobs"] = nb_jobs
+ pass
# Check system prerequisites
check_gcc_version(config["gcc_version_min"], envAcc)
# Download archives
return os.path.abspath(destReal)
####################
-def __let_us_go(paraview_version=None, use_pleiade_mirrors=False):
+def __let_us_go(paraview_version=None, use_pleiade_mirrors=False, nb_jobs=None):
envAcc={}
- config=__init(paraview_version=paraview_version, use_pleiade_mirrors=use_pleiade_mirrors)
+ config=__init(paraview_version=paraview_version, use_pleiade_mirrors=use_pleiade_mirrors, nb_jobs=nb_jobs)
# Prepare build
rootDir="SalomeMini"
parser = OptionParser()
parser.add_option("--with-paraview-version", dest="paraview_version",
help="Build a specific paraview version. Give the version number (e.g. 5.1) and a git sha1.", metavar="number,sha1")
+ parser.add_option("-j", dest="nb_jobs",
+ help="Specify the number of jobs to run simultaneously.", metavar="nb_jobs")
parser.add_option("--pleiade",
action="store_true", dest="pleiade", default=False,
help="Use PLEIADE mirrors (for EDF).")
print "Unrecognized argument(s):", ",".join(args)
sys.exit(1)
+ nb_jobs = None
+ if options.nb_jobs:
+ nb_jobs = int(options.nb_jobs)
+
paraview_version = None
if options.paraview_version:
try:
print "Syntax error in paraview version"
sys.exit(1)
- __let_us_go(paraview_version=paraview_version, use_pleiade_mirrors=options.pleiade)
+ __let_us_go(paraview_version=paraview_version, use_pleiade_mirrors=options.pleiade, nb_jobs=nb_jobs)