From e5b1596b69a1c77b3d8d2b235b65e624a2383921 Mon Sep 17 00:00:00 2001 From: SomberNight Date: Thu, 9 Apr 2020 22:11:25 +0200 Subject: [PATCH] build: add workaround for "pyinstaller with new setuptools" issue Traceback (most recent call last): File "site-packages\PyInstaller\loader\rthooks\pyi_rth_pkgres.py", line 13, in File "c:\python3\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 623, in exec_module File "site-packages\pkg_resources\__init__.py", line 86, in ModuleNotFoundError: No module named 'pkg_resources.py2_warn' [7048] Failed to execute script pyi_rth_pkgres --- contrib/build-wine/deterministic.spec | 1 + contrib/osx/osx.spec | 1 + 2 files changed, 2 insertions(+) diff --git a/contrib/build-wine/deterministic.spec b/contrib/build-wine/deterministic.spec index 9ee6b04a7..2ad11294b 100644 --- a/contrib/build-wine/deterministic.spec +++ b/contrib/build-wine/deterministic.spec @@ -16,6 +16,7 @@ home = 'C:\\electrum\\' # see https://github.com/pyinstaller/pyinstaller/issues/2005 hiddenimports = [] +hiddenimports += collect_submodules('pkg_resources') # workaround for https://github.com/pypa/setuptools/issues/1963 hiddenimports += collect_submodules('trezorlib') hiddenimports += collect_submodules('safetlib') hiddenimports += collect_submodules('btchip') diff --git a/contrib/osx/osx.spec b/contrib/osx/osx.spec index 2bcaac9fd..f9ba4fec4 100644 --- a/contrib/osx/osx.spec +++ b/contrib/osx/osx.spec @@ -59,6 +59,7 @@ block_cipher = None # see https://github.com/pyinstaller/pyinstaller/issues/2005 hiddenimports = [] +hiddenimports += collect_submodules('pkg_resources') # workaround for https://github.com/pypa/setuptools/issues/1963 hiddenimports += collect_submodules('trezorlib') hiddenimports += collect_submodules('safetlib') hiddenimports += collect_submodules('btchip')