+def sat_package(config, tmp_working_dir, options, logger):
+ '''Prepare a dictionary that stores all the needed directories and files to
+ add in a salomeTool package.
+
+ :param tmp_working_dir str: The temporary local working directory
+ :param options OptResult: the options of the launched command
+ :return: the dictionary that stores all the needed directories and files to
+ add in a salomeTool package.
+ {label : (path_on_local_machine, path_in_archive)}
+ :rtype: dict
+ '''
+ d_project = {}
+
+ # we include sat himself
+ d_project["all_sat"]=(config.VARS.salometoolsway, "")
+
+ # and we overwrite local.pyconf with a clean wersion.
+ local_pyconf_tmp_path = os.path.join(tmp_working_dir, "local.pyconf")
+ local_file_path = os.path.join(config.VARS.datadir, "local.pyconf")
+ local_cfg = src.pyconf.Config(local_file_path)
+ local_cfg.PROJECTS.project_file_paths=src.pyconf.Sequence(local_cfg.PROJECTS)
+ local_cfg.LOCAL["base"] = "default"
+ local_cfg.LOCAL["workdir"] = "default"
+ local_cfg.LOCAL["log_dir"] = "default"
+ local_cfg.LOCAL["archive_dir"] = "default"
+ local_cfg.LOCAL["VCS"] = "None"
+ local_cfg.LOCAL["tag"] = src.get_salometool_version(config)
+
+ # if the archive contains a project, we write its relative path in local.pyconf
+ if options.project:
+ project_arch_path = os.path.join("projects", options.project,
+ os.path.basename(options.project_file_path))
+ local_cfg.PROJECTS.project_file_paths.append(project_arch_path, "")
+
+ ff = open(local_pyconf_tmp_path, 'w')
+ local_cfg.__save__(ff, 1)
+ ff.close()
+ d_project["local.pyconf"]=(local_pyconf_tmp_path, "data/local.pyconf")
+ return d_project
+
+
+def project_package(config, name_project, project_file_path, ftp_mode, tmp_working_dir, embedded_in_sat, logger):