From 9fba50901fc45182f9f2e28d7b2f14e8408fc8bc Mon Sep 17 00:00:00 2001 From: Gilles DAVID Date: Mon, 31 May 2021 10:34:51 +0200 Subject: [PATCH] Venv requirements.txt file generated only if venv directory is really a venv --- bin/appli_gen.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bin/appli_gen.py b/bin/appli_gen.py index dc10bd55b..0ea6f37ae 100755 --- a/bin/appli_gen.py +++ b/bin/appli_gen.py @@ -359,7 +359,9 @@ def install(prefix, config_file, verbose=0): venv_directory_path = None if "venv_directory_path" in _config: venv_directory_path = _config["venv_directory_path"] - if os.path.isdir(venv_directory_path): + venv_bin_directory_path = os.path.join(venv_directory_path, 'bin') + venv_pip_executable = os.path.join(venv_bin_directory_path, 'pip') + if os.path.isdir(venv_directory_path) and os.path.isfile(venv_pip_executable): venv_directory_path_target_link = os.path.join(home_dir, "venv") virtual_salome.symlink(venv_directory_path, venv_directory_path_target_link) requirement_file = os.path.join(home_dir, 'requirements.txt') -- 2.39.2