From: Michael Jeanson Date: Wed, 8 Mar 2023 16:06:37 +0000 (-0500) Subject: fix: python: monkey patch the proper sysconfig implementation X-Git-Url: https://git.efficios.com/?a=commitdiff_plain;h=927263e4ea62877af7240cfdb1514ae949dbfc2e;p=babeltrace.git fix: python: monkey patch the proper sysconfig implementation Since we monkey patch sysconfig, use the distutils implementation when building with distutils and the upstream one when building with setuptools. This ensures the properly patched version is used to build the extension. Change-Id: I66eb2d02519d585a15721b2bd77007672e895d7a Signed-off-by: Michael Jeanson Reviewed-on: https://review.lttng.org/c/babeltrace/+/9621 Tested-by: jenkins Reviewed-by: Jérémie Galarneau --- diff --git a/src/bindings/python/bt2/setup.py.in b/src/bindings/python/bt2/setup.py.in index fff97087..9b4294c7 100644 --- a/src/bindings/python/bt2/setup.py.in +++ b/src/bindings/python/bt2/setup.py.in @@ -5,12 +5,13 @@ import sys import os -import sysconfig if sys.version_info < (3, 12): from distutils.core import setup, Extension + import distutils.sysconfig as sysconfig else: from setuptools import setup, Extension + import sysconfig PY_PATH_WARN_MSG = """ -------------------------------------WARNING------------------------------------