Skip to content

Commit

Permalink
Github workflow: maybe remove all related symlinks
Browse files Browse the repository at this point in the history
  • Loading branch information
jhoyt4 committed Feb 14, 2024
1 parent 1a8a3cd commit 37fd0ba
Showing 1 changed file with 17 additions and 6 deletions.
23 changes: 17 additions & 6 deletions .github/workflows/buildmaster.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,19 +72,30 @@ jobs:
echo "PYTHONVERS=${PYTHONVERS}" >> $GITHUB_ENV
${PKGMGR_CMD} update
# brute force upgrade and unlink python versions
# unlink python3 and remove all symlinks related to then
# specified python version
${PKGMGR_CMD} unlink python3
rm -f ${HB_PREFIX}/bin/*${PYTHONVERS}*
# remove azure-cli since we won't need install
${PKGMGR_CMD} uninstall azure-cli --force --ignore-dependencies
# brute force unlink and unpgrade python versions
# we'll re-link the specified version later
INSTALLED_PYTHONS=$($PKGMGR_CMD list|grep 'python@')
rm -Rf ${HB_PREFIX}/bin/2to3*
for PYTH in $INSTALLED_PYTHONS; do
${PKGMGR_CMD} unlink $PYTH
$PKGMGR_CMD upgrade $PYTH --force
${PKGMGR_CMD} uninstall $PYTH --force --ignore-dependencies
done
# ask homebrew to cleanup any dead links and upgrade the
# remaining packages
${PKGMGR_CMD} cleanup
${PKGMGR_CMD} upgrade --force
## Install specified python version
${PKGMGR_CMD} install python@${PYTHONVERS} --force --overwrite
## Install/re-install specified python version
${PKGMGR_CMD} reinstall python@${PYTHONVERS} --force
${PKGMGR_CMD} link python@${PYTHONVERS} --force --overwrite
# macOS based github runners starting at macos-14 only run on arm64
Expand Down Expand Up @@ -137,7 +148,7 @@ jobs:
;;
esac
# homebrew uses different prefixes on x86_64 and arm64, find the
# correct one and setup the correct build variables
# correct one and setup the correct build variables
C_INCLUDE_PATH=$HB_PREFIX/include:$C_INCLUDE_PATH
echo "C_INCLUDE_PATH=$C_INCLUDE_PATH" >> $GITHUB_ENV
CPLUS_INCLUDE_PATH=$HB_PREFIX/include:$CPLUS_INCLUDE_PATH
Expand Down

0 comments on commit 37fd0ba

Please sign in to comment.