From 265052347838036211fb694d56db0e6041d6ca80 Mon Sep 17 00:00:00 2001 From: Anton Maklakov Date: Fri, 1 Dec 2023 13:48:07 +0700 Subject: [PATCH] system python fix 02 --- .github/workflows/scripts/prerequisites-macos.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/scripts/prerequisites-macos.sh b/.github/workflows/scripts/prerequisites-macos.sh index b0e71953b181e..65299586a9df0 100755 --- a/.github/workflows/scripts/prerequisites-macos.sh +++ b/.github/workflows/scripts/prerequisites-macos.sh @@ -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