]> SALOME platform Git repositories - tools/sat_salome.git/commitdiff
Salome HOME
Use sysconfig.get_paths robust implementation to retrieve native Python install direc...
authorNabil Ghodbane <nabil.ghodbane@cea.fr>
Mon, 20 Dec 2021 13:55:04 +0000 (14:55 +0100)
committerNabil Ghodbane <nabil.ghodbane@cea.fr>
Mon, 20 Dec 2021 13:55:04 +0000 (14:55 +0100)
products/env_scripts/Python.py

index 78390962f175f5d92809027c8bae70f286f53724..f02d87f6977810297caf0ab66a1bec3c52bae5b0 100644 (file)
@@ -38,9 +38,10 @@ def set_env(env,prereq_dir,version,forBuild=None):
     
 
 def set_nativ_env(env):
-    import sys
+    import sys, sysconfig
     #env.set('PYTHONHOME',"%s.%s" % sys.version_info[0:2])
-    env.set('PYTHON_ROOT_DIR', '/usr')
+    env.set('PYTHON_ROOT_DIR', "/usr")
+    env.set('PYTHON_INCLUDE',  "%s" % sysconfig.get_paths()['include'])
     env.set('PYTHON_VERSION', "%s.%s" % sys.version_info[0:2])
     if sys.version_info[0] == 3 :
         env.set('PYTHONBIN','/usr/bin/python3')