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 12:21:25 +0000 (08:21 -0400)
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>

No differences found
This page took 0.025186 seconds and 4 git commands to generate.