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:20:37 +0000 (08:20 -0400)
commit62ac73652e744e80132b30994267c66ebc4a9ccc
treea26456d2e46132b5d706782a90ee29f4bc6e93e3
parentb5d90d0b363db46ec5b583a2604309c5ef4b8938
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
src/python-lttngust/Makefile.am
This page took 0.024389 seconds and 4 git commands to generate.