Skip to content

Commit

Permalink
system python fix 02
Browse files Browse the repository at this point in the history
  • Loading branch information
antmak committed Dec 1, 2023
1 parent 23c24f5 commit 2650523
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/scripts/prerequisites-macos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,15 @@ brew install \
pkg-config \
&& :

# workaround for missing of deprecated 'distutils.version' module
# https://peps.python.org/pep-0632/#migration-advice
# https://pypi.org/project/looseversion/
PYFIX_FILE=/usr/local/Cellar/glib/2.78.1/share/glib-2.0/codegen/utils.py
if [ -f "${PYFIX_FILE}" ] ; then
python3 -m pip install --upgrade pip
python3 -m pip install packaging
python3 -m pip install looseversion
python3 -m pip freeze

sed -i='' "s/distutils.version/packaging/" "${PYFIX_FILE}"
sed -i='' "s/distutils.version/looseversion/" "${PYFIX_FILE}"
grep -v "^#" "${PYFIX_FILE}" | head
fi

0 comments on commit 2650523

Please sign in to comment.