Skip to content

Commit

Permalink
Diagnostic: Output new and updated env vars
Browse files Browse the repository at this point in the history
  • Loading branch information
BenjamenMeyer committed Dec 15, 2024
1 parent f94c11d commit f996cda
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions script/cibuild
Original file line number Diff line number Diff line change
Expand Up @@ -63,25 +63,36 @@ then
HOMEBREW_BIN="${HOMEBREW_PREFIX}/bin"
HOMEBREW_PYTHON_BIN="$(brew --prefix python)/libexec/bin"

echo "Build With Python Version: ${BUILD_WITH_PYTHON_VERSION}"
echo " Homebrew Prefix: ${HOMEBREW_PREFIX}"
echo " Homebrew Bin: ${HOMEBREW_BIN}"
echo " Homebrew Python Bin: ${HOMEBREW_PYTHON_BIN}"

# Homebrew tooling needs to come first in the path search
export PATH=${HOMEBREW_BIN}:${HOMEBREW_PYTHON_BIN}:${PATH}
echo "Review Homebrew Applications:"
ls ${HOMEBREW_BIN}
echo "Review Homebrew Python Applications:"
ls ${HOMEBREW_PYTHON_BIN}
#echo "Review Homebrew Applications:"
#ls ${HOMEBREW_BIN}
#echo "Review Homebrew Python Applications:"
#ls ${HOMEBREW_PYTHON_BIN}

HOMEBREW_PYTHON_VERSION=$(${HOMEBREW_PYTHON_BIN}/python${BUILD_WITH_PYTHON_VERSION} -c "import sys; print(f'{sys.version_info.major}.{sys.version_info.minor}')")
echo "Detected Python Version ${HOMEBREW_PYTHON_VERSION}"
echo " Detected Python Version: ${HOMEBREW_PYTHON_VERSION}"

# Ensure it uses the correct Python version
export PYTHONHOME="${HOMEBREW_BIN}/lib/python${HOMEBREW_PYTHON_VERSION}"
export PYTHONPATH="${HOMEBREW_BIN}/lib/python${HOMEBREW_PYTHON_VERSION}/site-packages"
export HOMEBREW_PYTHON3_CFLAGS="$(${HOMEBREW_PYTHON_BIN}/python${BUILD_WITH_PYTHON_VERSION}-config --cflags)"
export HOMEBREW_PYTHON3_LDFLAGS="$(${HOMEBREW_PYTHON_BIN}/python${BUILD_WITH_PYTHON_VERSION}-config --ldflags)"
echo " Python Home: ${PYTHONHOME}"
echo " Python Path: ${PYTHONPATH}"
echo " Homebrew Python CFlags: ${HOMEBREW_PYTHON3_CLFLAGS}"
echo " Homebrew Python LDFlags: ${HOMEBREW_PYTHON3_LDFLAGS}"

# Homebrew needs certain flags set so its installation parts are found
export CFLAGS="-I${HOMEBREW_PREFIX}/include ${HOMEBREW_PYTHON3_CFLAGS} ${CFLAGS}"
export LDFLAGS="-L${HOMEBREW_PREFIX}/lib ${HOMEBREW_PYTHON3_LDFLAGS} ${LDFLAGS}"
echo " CFlags: ${CFLAGS}"
echo " LDFlags: ${LDFLAGS}"

script/build -DCMAKE_BUILD_TYPE=RelWithDebInfo $@
# On macOS, the following is done by the calling CI workflow
Expand Down

0 comments on commit f996cda

Please sign in to comment.