summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mesonbuild/dependencies/python.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/mesonbuild/dependencies/python.py b/mesonbuild/dependencies/python.py
index efb904eca..fe778aff6 100644
--- a/mesonbuild/dependencies/python.py
+++ b/mesonbuild/dependencies/python.py
@@ -115,7 +115,9 @@ class BasicPythonExternalProgram(ExternalProgram):
with importlib.resources.path('mesonbuild.scripts', 'python_info.py') as f:
cmd = self.get_command() + [str(f)]
- p, stdout, stderr = mesonlib.Popen_safe(cmd)
+ env = os.environ.copy()
+ env['SETUPTOOLS_USE_DISTUTILS'] = 'stdlib'
+ p, stdout, stderr = mesonlib.Popen_safe(cmd, env=env)
try:
info = json.loads(stdout)