Salome HOME
spns #26907: use distro.name to retrieve platform
authorNabil Ghodbane <nabil.ghodbane@cea.fr>
Wed, 12 Jan 2022 10:58:49 +0000 (11:58 +0100)
committerNabil Ghodbane <nabil.ghodbane@cea.fr>
Wed, 12 Jan 2022 10:58:49 +0000 (11:58 +0100)
products/env_scripts/qt.py

index 55abd20e30dceb5da18112d965af24acb0bc7f0b..c22a6dd5b1a108ed57d857dd4bb3a0e58515e428 100644 (file)
@@ -25,7 +25,8 @@ def set_env(env, prereq_dir, version):
 def set_nativ_env(env):
 
     # Adapt Qt libraries dir according to the current distribution (generic -> Ubuntu)
-    if any(distribution in platform.platform() for distribution in ["debian", "generic"]) :
+    import distro
+    if any(distribution in distro.name().lower() for distribution in ["debian", "generic", "ubuntu"]) :
         qt_lib_dir='/usr/lib/x86_64-linux-gnu'
     else :
         qt_lib_dir='/usr/lib64'