We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3a1fbf0 commit 4ea64f7Copy full SHA for 4ea64f7
tls_client/cffi.py
@@ -1,10 +1,18 @@
1
from sys import platform
2
+from platform import machine
3
import ctypes
4
import os
5
6
+
7
+if platform == 'darwin':
8
+ file_ext = '-arm64.dylib' if machine() == "arm64" else '-x86.dylib'
9
+elif platform in ('win32', 'cygwin'):
10
+ file_ext = '.dll'
11
+else:
12
+ file_ext = '.so'
13
14
rootdir = os.path.abspath(os.path.dirname(__file__))
-dll_ext = 'dylib' if platform == 'darwin' else 'dll' if platform in ('win32', 'cygwin') else 'so'
-library = ctypes.cdll.LoadLibrary(f'{rootdir}/dependencies/tls-client.{dll_ext}')
15
+library = ctypes.cdll.LoadLibrary(f'{rootdir}/dependencies/tls-client{file_ext}')
16
17
# extract the exposed request function from the shared package
18
request = library.request
tls_client/dependencies/tls-client.dylib
-9.13 MB
0 commit comments