]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
Venv requirements.txt file generated only if venv directory is really a venv
authorGilles DAVID <gilles-g.david@edf.fr>
Mon, 31 May 2021 08:34:51 +0000 (10:34 +0200)
committerGilles DAVID <gilles-g.david@edf.fr>
Mon, 31 May 2021 08:34:51 +0000 (10:34 +0200)
bin/appli_gen.py

index dc10bd55b47c053f3e2fc1269be77cd179bafe46..0ea6f37ae9a79582b0e2229a1f017af52298fae0 100755 (executable)
@@ -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')