lbry-android-sdk/p4a/pythonforandroid/recipes/websocket-client/__init__.py
Akinwale Ariwodola 8b2694efb7
New build (#508)
* fix build for openssl 1.1.1b required for sdk
(cherry picked from commit aa49e3b2755b97b6331cdbbb89efc954de8d5977)

* use js code from master

* fix openssl recipe and tweak build
(cherry picked from commit 6e94c27021c7bd7b1e880c2fc314850e36a5a38e)

* remove unused build recipes
(cherry picked from commit f5c0577bdb175bfc0990602936bbc9e2052e1f25)
2019-03-30 21:58:45 +01:00

27 lines
944 B
Python

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 = '0.40.0'
# patches = ['websocket.patch'] # Paths relative to the recipe dir
depends = ['android', 'pyjnius', 'cryptography', 'pyasn1', 'pyopenssl']
recipe = WebSocketClient()