From fdb0e952b954e94bd40e65815db20d2a42edacfb Mon Sep 17 00:00:00 2001 From: cygnusx Date: Tue, 30 Nov 2021 11:21:07 +0100 Subject: [PATCH] Added support for MacOS --- mtkclient/Library/usblib.py | 2 +- requirements.txt | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/mtkclient/Library/usblib.py b/mtkclient/Library/usblib.py index cbccab5..9cdd2d6 100755 --- a/mtkclient/Library/usblib.py +++ b/mtkclient/Library/usblib.py @@ -98,7 +98,7 @@ class usb_class(metaclass=LogBase): fh = logging.FileHandler(logfilename, encoding='utf-8') self.__logger.addHandler(fh) - if sys.platform.startswith('freebsd') or sys.platform.startswith('linux'): + if sys.platform.startswith('freebsd') or sys.platform.startswith('linux') or sys.platform.startswith('darwin'): self.backend = usb.backend.libusb1.get_backend(find_library=lambda x: "libusb-1.0.so") elif sys.platform.startswith('win32'): if calcsize("P") * 8 == 64: diff --git a/requirements.txt b/requirements.txt index 946fe9a..d0c588a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,5 +2,4 @@ wheel pyusb pycryptodome colorama -usb - +usb \ No newline at end of file