-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1039 from debauchery1st/master
Recipe for websocket-client
- Loading branch information
Showing
2 changed files
with
50 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
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 | ||
|
||
|
||
class WebSocketClient(Recipe): | ||
|
||
url = 'https://github.com/debauchery1st/websocket-client/raw/master/websocket_client-0.40.0.tar.gz' | ||
|
||
version = '0.40.0' | ||
# md5sum = 'f1cf4cc7869ef97a98e5f4be25c30986' | ||
|
||
# patches = ['websocket.patch'] # Paths relative to the recipe dir | ||
|
||
depends = ['kivy', 'python2', 'android', 'pyjnius', | ||
'cryptography', 'pyasn1', 'pyopenssl'] | ||
|
||
recipe = WebSocketClient() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
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 | ||
+ |