Skip to content

Commit 8a99219

Browse files
committed
follow-up prev: electrum-ecc should search for libsecp dll in electrum/
The hack needs to be applied before we try importing electrum_ecc, i.e. it needs to be in the main script. However, it should also be applied if the main script is not invoked directly, but e.g. the user imports electrum directly. Hence the duplication.
1 parent 20e6902 commit 8a99219

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

electrum/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
is_local = not is_bundle and os.path.exists(os.path.join(os.path.dirname(os.path.dirname(__file__)), "electrum.desktop"))
77

88
# when running from source, on Windows, also search for DLLs in inner 'electrum' folder
9-
if is_local and os.name == 'nt':
9+
if is_local and os.name == 'nt': # fixme: duplicated between main script and __init__.py :(
1010
os.add_dll_directory(os.path.dirname(__file__))
1111

1212

run_electrum

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,11 @@ if is_pyinstaller:
6565
_file = open(sys.executable, 'rb')
6666

6767

68+
# when running from source, on Windows, also search for DLLs in inner 'electrum' folder
69+
if is_local and os.name == 'nt': # fixme: duplicated between main script and __init__.py :(
70+
os.add_dll_directory(os.path.join(os.path.dirname(__file__), 'electrum'))
71+
72+
6873
def check_imports():
6974
# pure-python dependencies need to be imported here for pyinstaller
7075
try:

0 commit comments

Comments
 (0)