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 <mjeanson@efficios.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/9621
Tested-by: jenkins <jenkins@lttng.org>
Reviewed-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
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------------------------------------