fix: python agent: use stdlib distutils when setuptools is installed
authorMichael Jeanson <mjeanson@debian.org>
Wed, 14 Jun 2023 20:55:28 +0000 (16:55 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 20 Jun 2023 17:49:37 +0000 (13:49 -0400)
commitd9bf54d4556d8df769e904427ac1a17087855b78
treea1a889a0c5ce46a32dae3712cf1fefc1a2f79ba6
parent02f8da13d233fe036df3f5b84e7371e1a2ac7afb
fix: python agent: use stdlib distutils when setuptools is installed

When the setuptools package is installed, it monkey patches the standard
library distutils even if the user code doesn't import setuptools.

This results in a failure to install the python agent in a directory
which ins't in the current PYTHONPATH. To allow this setuptools requires
the '--single-version-externally-managed' options which is not
implemented in distutils.

To resolve this, force the use of distutils for python < 3.12 even when
setuptools is installed with the 'SETUPTOOLS_USE_DISTUTILS' environment
variable and use the proper setuptools option with python >= 3.12 which
doesn't include distutils anymore.

Change-Id: Idf477ca61bed460c9f6be7f481fe3b84624f328c
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
configure.ac
python-lttngust/Makefile.am
This page took 0.024142 seconds and 4 git commands to generate.