Open acyment opened 10 months ago
Adding pip install --upgrade --force-reinstall Pillow
in build_mac.sh
seems to fix the issue:
...
echo " => Installing dependencies to venv with pip..."
pip install -r requirements.txt
pip install --upgrade --force-reinstall Pillow
...
Describe the bug Build fails in macOS, apparently due to a problem with the icon's format
To Reproduce Try to run build_mac.sh on a Mac
Expected behavior Build obtained in dist folder
Log```
3383 INFO: Building BUNDLE BUNDLE-00.toc Traceback (most recent call last): File "/Users/acyment/dev/onthespot/venv/lib/python3.11/site-packages/PyInstaller/building/icon.py", line 50, in normalize_icon_type from PIL import Image as PILImage ModuleNotFoundError: No module named 'PIL'
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/Users/acyment/dev/onthespot/venv/bin/pyinstaller", line 8, in
sys.exit(_console_script_run())
^^^^^^^^^^^^^^^^^^^^^
File "/Users/acyment/dev/onthespot/venv/lib/python3.11/site-packages/PyInstaller/main.py", line 194, in _console_script_run
run()
File "/Users/acyment/dev/onthespot/venv/lib/python3.11/site-packages/PyInstaller/main.py", line 180, in run
run_build(pyi_config, spec_file, vars(args))
File "/Users/acyment/dev/onthespot/venv/lib/python3.11/site-packages/PyInstaller/main.py", line 61, in run_build
PyInstaller.building.build_main.main(pyi_config, spec_file, kwargs)
File "/Users/acyment/dev/onthespot/venv/lib/python3.11/site-packages/PyInstaller/building/build_main.py", line 1019, in main
build(specfile, distpath, workpath, clean_build)
File "/Users/acyment/dev/onthespot/venv/lib/python3.11/site-packages/PyInstaller/building/build_main.py", line 944, in build
exec(code, spec_namespace)
File "/Users/acyment/dev/onthespot/onthespot_mac.spec", line 52, in
app = BUNDLE(
^^^^^^^
File "/Users/acyment/dev/onthespot/venv/lib/python3.11/site-packages/PyInstaller/building/osx.py", line 115, in init
self.postinit()
File "/Users/acyment/dev/onthespot/venv/lib/python3.11/site-packages/PyInstaller/building/datastruct.py", line 184, in postinit
self.assemble()
File "/Users/acyment/dev/onthespot/venv/lib/python3.11/site-packages/PyInstaller/building/osx.py", line 140, in assemble
self.icon = normalize_icon_type(self.icon, ("icns",), "icns", CONF["workpath"])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/acyment/dev/onthespot/venv/lib/python3.11/site-packages/PyInstaller/building/icon.py", line 54, in normalize_icon_type
raise ValueError(
ValueError: Received icon image '/Users/acyment/dev/onthespot/src/onthespot/resources/icon.png' which exists but is not in the correct format. On this platform, only ('icns',) images may be used as icons. If Pillow is installed, automatic conversion will be attempted. Please install Pillow or convert your 'png' file to one of ('icns',) and try again.
=> Setting executable permissions..
=> Cleaning ..
=> Done