From a1a585ec19eb940e52488b09d3a45ee1946d8552 Mon Sep 17 00:00:00 2001 From: Kostiantyn Syrykh Date: Wed, 1 Dec 2021 15:00:35 +0200 Subject: [PATCH] Remove websocket-client recipe Attempt to use websocket-client recipe results in ModuleNotFoundError: No module named 'websocket'. On the other hand it works fine if installed without a recipe. --- .../recipes/websocket-client/__init__.py | 27 ------------------ .../recipes/websocket-client/websocket.patch | 28 ------------------- 2 files changed, 55 deletions(-) delete mode 100644 pythonforandroid/recipes/websocket-client/__init__.py delete mode 100644 pythonforandroid/recipes/websocket-client/websocket.patch diff --git a/pythonforandroid/recipes/websocket-client/__init__.py b/pythonforandroid/recipes/websocket-client/__init__.py deleted file mode 100644 index 525fcec2a6..0000000000 --- a/pythonforandroid/recipes/websocket-client/__init__.py +++ /dev/null @@ -1,27 +0,0 @@ -from pythonforandroid.toolchain import Recipe - -# if android app crashes on start with "ImportError: No module named websocket" -# -# copy the 'websocket' directory into your app directory to force inclusion. -# -# see my example at https://github.com/debauchery1st/example_kivy_websocket-recipe -# -# If you see errors relating to 'SSL not available' ensure you have the package backports.ssl-match-hostname -# in the buildozer requirements, since Kivy targets python 2.7.x -# -# You may also need sslopt={"cert_reqs": ssl.CERT_NONE} as a parameter to ws.run_forever() if you get an error relating to -# host verification - - -class WebSocketClient(Recipe): - - url = 'https://github.com/websocket-client/websocket-client/archive/v{version}.tar.gz' - - version = '1.0.1' - - # patches = ['websocket.patch'] # Paths relative to the recipe dir - - depends = ['android', 'pyjnius', 'cryptography', 'pyasn1', 'pyopenssl'] - - -recipe = WebSocketClient() diff --git a/pythonforandroid/recipes/websocket-client/websocket.patch b/pythonforandroid/recipes/websocket-client/websocket.patch deleted file mode 100644 index 694bcb653b..0000000000 --- a/pythonforandroid/recipes/websocket-client/websocket.patch +++ /dev/null @@ -1,28 +0,0 @@ -diff --git a/websocket/_logging.py b/websocket/_logging.py -index 8a5f4a5..cebc23b 100644 ---- a/websocket/_logging.py -+++ b/websocket/_logging.py -@@ -19,9 +19,8 @@ Copyright (C) 2010 Hiroki Ohtani(liris) - Boston, MA 02110-1335 USA - - """ --import logging -- --_logger = logging.getLogger('websocket') -+from kivy.logger import Logger -+_logger = Logger - _traceEnabled = False - - __all__ = ["enableTrace", "dump", "error", "debug", "trace", -@@ -67,8 +66,9 @@ def trace(msg): - - - def isEnabledForError(): -- return _logger.isEnabledFor(logging.ERROR) -+ return True - - - def isEnabledForDebug(): -- return _logger.isEnabledFor(logging.DEBUG) -+ return True -+