Skip to content

Commit 4ea64f7

Browse files
committed
updates
1 parent 3a1fbf0 commit 4ea64f7

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

tls_client/cffi.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,18 @@
11
from sys import platform
2+
from platform import machine
23
import ctypes
34
import os
45

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+
514
rootdir = os.path.abspath(os.path.dirname(__file__))
6-
dll_ext = 'dylib' if platform == 'darwin' else 'dll' if platform in ('win32', 'cygwin') else 'so'
7-
library = ctypes.cdll.LoadLibrary(f'{rootdir}/dependencies/tls-client.{dll_ext}')
15+
library = ctypes.cdll.LoadLibrary(f'{rootdir}/dependencies/tls-client{file_ext}')
816

917
# extract the exposed request function from the shared package
1018
request = library.request
-9.13 MB
Binary file not shown.

0 commit comments

Comments
 (0)