From: Nabil Ghodbane Date: Mon, 20 Dec 2021 13:55:04 +0000 (+0100) Subject: Use sysconfig.get_paths robust implementation to retrieve native Python install direc... X-Git-Tag: V9_8_0~3 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=e189378e569783ec58b523e04e0cbe78c7fb1cea;p=tools%2Fsat_salome.git Use sysconfig.get_paths robust implementation to retrieve native Python install directory - otherwise PyROOT will not compile on DB10 --- diff --git a/products/env_scripts/Python.py b/products/env_scripts/Python.py index 7839096..f02d87f 100644 --- a/products/env_scripts/Python.py +++ b/products/env_scripts/Python.py @@ -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')