docs: doc-cache-generator: Pass the full os.environ so pkg-config can be found

We want to pass the `PATH` from the current environment.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8327>
This commit is contained in:
Thibault Saunier 2025-01-20 13:26:18 -03:00
parent ed7b210ae7
commit 2ff6a3ecb6

View file

@ -22,7 +22,6 @@ import os
import sys
import re
import subprocess
import tempfile
from pathlib import Path as P
from argparse import ArgumentParser
@ -51,7 +50,7 @@ PROJECT_NAME_MAP = {
def get_c_flags(dep, buildroot, uninstalled=True):
env = {}
env = os.environ.copy()
if uninstalled:
env['PKG_CONFIG_PATH'] = os.path.join(buildroot, 'meson-uninstalled')
res = subprocess.run(['pkg-config', '--cflags', dep], env=env, capture_output=True)