From 731e00703181017c837588e03c3b63a548e470b8 Mon Sep 17 00:00:00 2001 From: Andreas Motl Date: Thu, 18 Jul 2024 01:52:05 +0200 Subject: [PATCH] Setup: Fix PyInstaller's `Failed to import module` PyInstaller.exceptions.ImportErrorWhenRunningHook: Failed to import module __PyInstaller_hooks_0_importlib_metadata required by hook for module /Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/PyInstaller/hooks/hook-importlib_metadata.py. --- .github/workflows/release-app.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release-app.yml b/.github/workflows/release-app.yml index 588863e..d00f8c2 100644 --- a/.github/workflows/release-app.yml +++ b/.github/workflows/release-app.yml @@ -42,7 +42,16 @@ jobs: cache-dependency-path: 'pyproject.toml' - name: Set up project - run: pip install --use-pep517 --prefer-binary --editable='.[cfr,release-cfr]' + run: | + + # `setuptools 64` adds support for editable install hooks (PEP 660). + # https://github.com/pypa/setuptools/blob/main/CHANGES.rst#v6400 + # `setuptools 71` significantly re-vendors setuptools packages, causing hiccups on Python 3.8. + # https://github.com/pypa/setuptools/pull/4457 + pip install "setuptools>=64,<71" --upgrade + + # Install package in editable mode. + pip install --use-pep517 --prefer-binary --editable='.[cfr,release-cfr]' - name: Build application bundle run: poe build-cfr