bindings: (fixes #948) Rollback the file encoding changes made to ns__init__.py

Fixes issue introduced in 20ae6fb2d0
This commit is contained in:
Gabriel Ferreira
2023-08-24 20:01:18 +00:00
parent 992c5b53c4
commit 1d980f33ce

View File

@@ -155,7 +155,7 @@ def extract_linked_libraries(library_name: str, prefix: str) -> tuple:
linked_libs = []
# First discover which 3rd-party libraries are used by the current module
try:
with open(os.path.abspath(library_path), "rb", encoding="utf-8") as f:
with open(os.path.abspath(library_path), "rb") as f:
linked_libs = re.findall(b"\x00(lib.*?.%b)" % LIBRARY_EXTENSION.encode("utf-8"), f.read())
except Exception as e:
print("Failed to extract libraries used by {library} with exception:{exception}"