From 927263e4ea62877af7240cfdb1514ae949dbfc2e Mon Sep 17 00:00:00 2001 From: Michael Jeanson Date: Wed, 8 Mar 2023 11:06:37 -0500 Subject: [PATCH] fix: python: monkey patch the proper sysconfig implementation MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- src/bindings/python/bt2/setup.py.in | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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------------------------------------ -- 2.34.1