]> SALOME platform Git repositories - tools/sat.git/commitdiff
Salome HOME
sat #17294 : pas de clean install pour les produits pip installés dans python - modif...
authorcrouzet <nicolas.crouzet@cea.fr>
Wed, 4 Sep 2019 09:53:32 +0000 (11:53 +0200)
committercrouzet <nicolas.crouzet@cea.fr>
Wed, 4 Sep 2019 09:53:32 +0000 (11:53 +0200)
commands/compile.py
src/internal_config/salomeTools.pyconf

index 47a3d4b8a53159c6dd7b7f1197c31efe0069eb75..d44375790278999df533884d68f729c996539fd3 100644 (file)
@@ -260,8 +260,14 @@ def compile_all_products(sat, config, options, products_infos, all_products_dict
         
         if res_prod != 0:
             res += 1
-            
-            if error_step != "CHECK":
+            # there was an error, we clean install dir, unless :
+            #  - the error step is "check", or
+            #  - the product is managed by pip and installed in python dir
+            do_not_clean_install=False
+            if (error_step == "CHECK") or (is_pip and \
+                src.appli_test_property(config,"pip_install_dir", "python")) :
+                do_not_clean_install=True
+            if not do_not_clean_install:
                 # Clean the install directory if there is any
                 logger.write(_(
                             "Cleaning the install directory if there is any\n"),
@@ -474,6 +480,7 @@ def compile_product_pip(sat,
         #log_res_step(logger, res)
         res=1
         error_step = "PIP"
+        logger.write("\nError in pip command, please consult details with sat log command's internal traces\n", 5)
 
     return res, len_end_line, error_step 
 
index 2b93e11b8fd0f1c0abe84893b996e1c59976a11a..4e9a8d557033ea68408c8ca47344a56eb7ec6e77 100644 (file)
@@ -16,8 +16,8 @@ INTERNAL :
     }
     command :
     {
-        pip_download : "pip3 download --disable-pip-version-check"
-        pip_install : "pip3 install --disable-pip-version-check --no-index"
+        pip_download : "python -m pip download --disable-pip-version-check"
+        pip_install : "python -m pip install --disable-pip-version-check --no-index"
     }
 }
 PRODUCTS :