File tree Expand file tree Collapse file tree 2 files changed +14
-4
lines changed Expand file tree Collapse file tree 2 files changed +14
-4
lines changed Original file line number Diff line number Diff line change 66from tempfile import TemporaryFile
77from platform import architecture , machine
88from sys import platform
9- from typing import Optional , Any
9+ from typing import Optional , Any , List
1010from urllib .request import urlopen
1111
1212# Monkeypatch for Python 3.11
@@ -45,6 +45,15 @@ class SupportedPlatformEnum(Enum):
4545 LINUX_ARM64 = 8
4646 LINUX_ARM32 = 9
4747
48+ @classmethod
49+ def all_linux_platforms (cls ) -> List ["SupportedPlatformEnum" ]:
50+ return [
51+ cls .LINUX_32 ,
52+ cls .LINUX_64 ,
53+ cls .LINUX_ARM32 ,
54+ cls .LINUX_ARM64 ,
55+ ]
56+
4857
4958CURRENT_PLATFORM = None
5059if architecture ()[0 ] == "64bit" :
Original file line number Diff line number Diff line change 8484else :
8585 BASE_NASSL_EXT_SETUP ["extra_compile_args" ].append ("-Wall" )
8686
87- # Hide internal OpenSSL symbols to avoid "symbol confusion" when Python loads the system's OpenSSL libraries
88- # https://github.com/nabla-c0d3/nassl/issues/95
89- BASE_NASSL_EXT_SETUP ["extra_link_args" ].append ("-Wl,--exclude-libs=ALL" )
87+ if CURRENT_PLATFORM in SupportedPlatformEnum .all_linux_platforms ():
88+ # Hide internal OpenSSL symbols to avoid "symbol confusion" when Python loads the system's OpenSSL libraries
89+ # https://github.com/nabla-c0d3/nassl/issues/95
90+ BASE_NASSL_EXT_SETUP ["extra_link_args" ].append ("-Wl,--exclude-libs=ALL" )
9091
9192 if CURRENT_PLATFORM == SupportedPlatformEnum .LINUX_64 :
9293 # Explicitly disable executable stack on Linux 64 to address issues with Ubuntu on Windows
You can’t perform that action at this time.
0 commit comments