build: win/mac: fix trezor plugin for new trezorlib
trezor==0.13.10 pulls in new dep "slip10", which relies on importlib magic
see 19561f0429/slip10/__init__.py (L6)
```
10.13 | E | plugins.trezor.trezor | error importing trezor plugin deps
Traceback (most recent call last):
File "importlib/metadata/__init__.py", line 397, in from_name
StopIteration
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "electrum/plugins/trezor/trezor.py", line 29, in <module>
from .clientbase import TrezorClientBase, RecoveryDeviceInputMethod
File "PyInstaller/loader/pyimod02_importers.py", line 450, in exec_module
File "electrum/plugins/trezor/clientbase.py", line 18, in <module>
import trezorlib.device
File "PyInstaller/loader/pyimod02_importers.py", line 450, in exec_module
File "trezorlib/device.py", line 27, in <module>
File "PyInstaller/loader/pyimod02_importers.py", line 450, in exec_module
File "slip10/__init__.py", line 6, in <module>
File "importlib/metadata/__init__.py", line 889, in version
File "importlib/metadata/__init__.py", line 862, in distribution
File "importlib/metadata/__init__.py", line 399, in from_name
importlib.metadata.PackageNotFoundError: No package metadata was found for slip10
```
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
# -*- mode: python -*-
|
||||
|
||||
from PyInstaller.utils.hooks import collect_data_files, collect_submodules, collect_dynamic_libs
|
||||
from PyInstaller.utils.hooks import collect_data_files, collect_submodules, collect_dynamic_libs, copy_metadata
|
||||
|
||||
import sys, os
|
||||
|
||||
@@ -44,6 +44,10 @@ datas += collect_data_files('safetlib')
|
||||
datas += collect_data_files('ckcc')
|
||||
datas += collect_data_files('bitbox02')
|
||||
|
||||
# some deps rely on importlib metadata
|
||||
datas += copy_metadata('slip10') # from trezor->slip10
|
||||
|
||||
|
||||
# We don't put these files in to actually include them in the script but to make the Analysis method scan them for imports
|
||||
a = Analysis([f"{PROJECT_ROOT}/{MAIN_SCRIPT}",
|
||||
f"{PROJECT_ROOT}/{PYPKG}/gui/qt/main_window.py",
|
||||
|
||||
@@ -47,6 +47,10 @@ datas += collect_data_files('safetlib')
|
||||
datas += collect_data_files('ckcc')
|
||||
datas += collect_data_files('bitbox02')
|
||||
|
||||
# some deps rely on importlib metadata
|
||||
datas += copy_metadata('slip10') # from trezor->slip10
|
||||
|
||||
|
||||
# We don't put these files in to actually include them in the script but to make the Analysis method scan them for imports
|
||||
a = Analysis([f"{PROJECT_ROOT}/{MAIN_SCRIPT}",
|
||||
f"{PROJECT_ROOT}/{PYPKG}/gui/qt/main_window.py",
|
||||
|
||||
Reference in New Issue
Block a user