From e189378e569783ec58b523e04e0cbe78c7fb1cea Mon Sep 17 00:00:00 2001 From: Nabil Ghodbane Date: Mon, 20 Dec 2021 14:55:04 +0100 Subject: [PATCH] Use sysconfig.get_paths robust implementation to retrieve native Python install directory - otherwise PyROOT will not compile on DB10 --- products/env_scripts/Python.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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') -- 2.39.2