We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5be990f commit c07c369Copy full SHA for c07c369
1 file changed
scripts/hook-libtorrent.py
@@ -0,0 +1,24 @@
1
+"""
2
+Hook for libtorrent.
3
4
+
5
+import os
6
+import glob
7
+import os.path
8
+from PyInstaller.utils.hooks import get_module_file_attribute
9
+from PyInstaller import compat
10
11
12
+def get_binaries():
13
+ if compat.is_win:
14
+ files = ('c:/Windows/System32/libssl-1_1-x64.dll', 'c:/Windows/System32/libcrypto-1_1-x64.dll')
15
+ for file in files:
16
+ if not os.path.isfile(file):
17
+ print(f"MISSING {file}")
18
+ return [(file, '.') for file in files]
19
+ return []
20
21
22
+binaries = get_binaries()
23
+for file in glob.glob(os.path.join(get_module_file_attribute('libtorrent'), 'libtorrent*pyd*')):
24
+ binaries.append((file, 'libtorrent'))
0 commit comments