]> SALOME platform Git repositories - tools/sat.git/commitdiff
Salome HOME
spns #34338: post build script is not embedded in archive
authorNabil Ghodbane <nabil.ghodbane@cea.fr>
Mon, 3 Apr 2023 10:11:48 +0000 (12:11 +0200)
committerNabil Ghodbane <nabil.ghodbane@cea.fr>
Tue, 16 May 2023 16:03:18 +0000 (18:03 +0200)
commands/package.py

index 88e59f34d36e0f95d88d48b61b2e2dca0c767744..f91476e2d6b6b87c7027b2a4ba37431b0af6de62 100644 (file)
@@ -1187,6 +1187,9 @@ def create_project_for_src_package(config, tmp_working_dir, with_vcs, with_ftp):
     compil_scripts_tmp_dir = os.path.join(project_tmp_dir,
                                          "products",
                                          "compil_scripts")
+    post_scripts_tmp_dir = os.path.join(project_tmp_dir,
+                                         "products",
+                                         "post_scripts")
     env_scripts_tmp_dir = os.path.join(project_tmp_dir,
                                          "products",
                                          "env_scripts")
@@ -1198,6 +1201,7 @@ def create_project_for_src_package(config, tmp_working_dir, with_vcs, with_ftp):
     for directory in [project_tmp_dir,
                       compil_scripts_tmp_dir,
                       env_scripts_tmp_dir,
+                      post_scripts_tmp_dir,
                       patches_tmp_dir,
                       application_tmp_dir]:
         src.ensure_path_exists(directory)
@@ -1241,6 +1245,7 @@ def create_project_for_src_package(config, tmp_working_dir, with_vcs, with_ftp):
                                         with_vcs,
                                         compil_scripts_tmp_dir,
                                         env_scripts_tmp_dir,
+                                        post_scripts_tmp_dir,
                                         patches_tmp_dir,
                                         products_pyconf_tmp_dir)
 
@@ -1258,6 +1263,7 @@ def find_product_scripts_and_pyconf(p_name,
                                     with_vcs,
                                     compil_scripts_tmp_dir,
                                     env_scripts_tmp_dir,
+                                    post_scripts_tmp_dir,
                                     patches_tmp_dir,
                                     products_pyconf_tmp_dir):
     '''Create a specific pyconf file for a given product. Get its environment
@@ -1275,6 +1281,8 @@ def find_product_scripts_and_pyconf(p_name,
                                        scripts directory of the project.
     :param env_scripts_tmp_dir str: The path to the temporary environment script
                                     directory of the project.
+    :param post_scripts_tmp_dir str: The path to the temporary post-processing script
+                                    directory of the project.
     :param patches_tmp_dir str: The path to the temporary patch scripts
                                 directory of the project.
     :param products_pyconf_tmp_dir str: The path to the temporary product
@@ -1294,6 +1302,11 @@ def find_product_scripts_and_pyconf(p_name,
         env_script_path = src.Path(p_info.environ.env_script)
         env_script_path.copy(env_scripts_tmp_dir)
 
+    # find the post script if any
+    if src.product.product_has_post_script(p_info):
+        post_script_path = src.Path(p_info.post_script)
+        post_script_path.copy(post_scripts_tmp_dir)
+
     # find the patches if any
     if src.product.product_has_patches(p_info):
         patches = src.pyconf.Sequence()