From 75af48a9ea3aad9674de1c3edba1f2292b723b9c Mon Sep 17 00:00:00 2001 From: crouzet Date: Wed, 4 Sep 2019 11:53:32 +0200 Subject: [PATCH] =?utf8?q?sat=20#17294=20:=20pas=20de=20clean=20install=20?= =?utf8?q?pour=20les=20produits=20pip=20install=C3=A9s=20dans=20python=20-?= =?utf8?q?=20modification=20des=20commandes=20pip?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- commands/compile.py | 11 +++++++++-- src/internal_config/salomeTools.pyconf | 4 ++-- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/commands/compile.py b/commands/compile.py index 47a3d4b..d443757 100644 --- a/commands/compile.py +++ b/commands/compile.py @@ -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 diff --git a/src/internal_config/salomeTools.pyconf b/src/internal_config/salomeTools.pyconf index 2b93e11..4e9a8d5 100644 --- a/src/internal_config/salomeTools.pyconf +++ b/src/internal_config/salomeTools.pyconf @@ -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 : -- 2.39.2