From 4c4d3475db6f58479e7d8b9a465130ab8234d5e9 Mon Sep 17 00:00:00 2001 From: Zanie Blue Date: Wed, 1 Jan 2025 15:45:53 -0600 Subject: [PATCH] Configure `pkg-config` during CPython builds (#460) Closes https://github.com/astral-sh/python-build-standalone/issues/449 --- cpython-unix/build-cpython.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cpython-unix/build-cpython.sh b/cpython-unix/build-cpython.sh index 70727c56..a94b8fab 100755 --- a/cpython-unix/build-cpython.sh +++ b/cpython-unix/build-cpython.sh @@ -9,6 +9,12 @@ export ROOT=`pwd` export PATH=${TOOLS_PATH}/${TOOLCHAIN}/bin:${TOOLS_PATH}/host/bin:${TOOLS_PATH}/deps/bin:$PATH +# Ensure that `pkg-config` (run by CPython's configure script) can find our dependencies +export PKG_CONFIG_PATH=${TOOLS_PATH}/deps/share/pkgconfig:${TOOLS_PATH}/deps/lib/pkgconfig + +# Ensure that `pkg-config` invocations include the static libraries +export PKG_CONFIG="pkg-config --static" + # configure somehow has problems locating llvm-profdata even though it is in # PATH. The macro it is using allows us to specify its path via an # environment variable.